How can I set up a text box Variable that can search for a text string in a field?
Hi Domo Community,
Like the title says, I'd like to set up a Variable to be used in a dashboard where users can input text and it will search for the text string in related reports and return the results. For example, I have a "Description" field for items. I'd like to search "6mm bolt" in the Variable/text box and have it return any attributes in the "Description" field that contain "6mm bolt".
I know how to set up a Variable. My biggest struggle is how do I implement in the Beastmode of a Card so it will work successfully? Thanks in advance.
Best Answer
-
For the original question, I have done something like this using a BeastMode as a card filter for every card on the page, filtering for 'Include':
CASE
WHEN
Text_Variable
IS NULL THEN 'Include'WHEN
Text_Variable
= 'Default Text' THEN 'Include'WHEN LOWER(
Description)
LIKE CONCAT('%', LOWER(Text_Variable
), '%' ) then 'Include'ELSE 'Exclude'
END
I set conditions for the Control variable either being null or for whatever default text I have set for that control variable so that it only filters the data after someone has entered something into it.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
1
Answers
-
We use the Searchable Filter Card to let users search through a DomoStats dataset of Cards, Dashboards, and Datasets to find what they are looking for.
If you point that filter card to the dataset containing that "Description" field then it should work pretty easily.Edited to remove the link to my instance. Search for "Searchable" in the app store to find it
0 -
Hi @zaclingen_fwm ,
Thanks for your response. Can you elaborate more on the search filter card and/or provide pictures? Your link takes me to your company's Domo domain which I cannot access.
0 -
Yeah I realized after the fact that the link wouldn't work for you.
Navigate to the App Store and search for "Searchable Filter Card"1 -
Great, I will give this a shot. Thanks!
1 -
For the original question, I have done something like this using a BeastMode as a card filter for every card on the page, filtering for 'Include':
CASE
WHEN
Text_Variable
IS NULL THEN 'Include'WHEN
Text_Variable
= 'Default Text' THEN 'Include'WHEN LOWER(
Description)
LIKE CONCAT('%', LOWER(Text_Variable
), '%' ) then 'Include'ELSE 'Exclude'
END
I set conditions for the Control variable either being null or for whatever default text I have set for that control variable so that it only filters the data after someone has entered something into it.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
1 -
@DavidChurchman Thank you for sharing your BeastMode! It worked perfectly for me. Much appreciated.
0 -
@DavidChurchman I hope you don't mind, but I am trying to do something similar to the OP. I am new to Domo and have been tasked with creating an expense dashboard. I was able to find my way through creating a massive ETL to get the proper dataset in place. But now I find myself stuck wanting the Management Team to be able to type "conference" and have the page filter to all expense records that contain conference across 10 different columns. I tried the Searchable Filter App, but it seems to compete with itself. I have now moved to creating a second ETL where I get the value from each column into one, then split it and do a dynamic unpivot to create a new dataset where I have a column for unique id and a column for the text. I just can't figure out where to go from here as I also attempted a Filter card, but let's say I have 225 rows containing that text, the user has to select each one. Ultimately, I am looking to have the user type a search term and hit enter, then the dashboard auto filters for them.
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 308 Workbench
- 7 Cloud Amplifier
- 10 Federated
- 3.8K Transform
- 661 Datasets
- 117 SQL DataFlows
- 2.2K Magic ETL
- 820 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 84 App Studio
- 46 Variables
- 781 Automate
- 193 Apps
- 483 APIs & Domo Developer
- 85 Workflows
- 23 Code Engine
- 43 AI and Machine Learning
- 22 AI Chat
- 3 AI Projects and Models
- 18 Jupyter Workspaces
- 409 Distribute
- 116 Domo Everywhere
- 282 Scheduled Reports
- 11 Software Integrations
- 146 Manage
- 142 Governance & Security
- 9 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 115 Community Announcements
- 4.8K Archive