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.
Welcome!
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
Welcome!
Welcome!
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 813 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 772 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 78 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 143 Manage
- 139 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive