Filter on two or more columns
Do pfilters require special configuring of python or something?
I want to embed an anchor reference link, to open a drill through page filtered on two or more columns in the row that was clicked. In the example below, clicking the link on the first row would open a page filtered on store=5, salesperson=Ralph.
Store SalesPerson Amount Link
5 Ralph $500 {link}
3 Mary $800 {link}
2 John $300 {link}
5 Peter $400 {link}
The link page has summaries. The drill through will go to the details that were aggregated to make the summaries.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **
Best Answer
-
Python configuration not needed. We build ours in Magic ETL utilizing the Formula Tile.
Steps:
- If you would like to create the URL for a page:
- Copy the pageID from the page's URL
- Paste it into the link below to replace pageID
- Copy the following text: [{"column":"columnToFilterOn","dataType":"string","operand":"IN","values":["valueFromColumnToFilterTo"]}]
- Replace columnToFilterOn with the EXACT column name from the datasource.
- Replace valueFromColumnToFilterTo with the EXACT value to use for filtering
- Go to this link: https://meyerweb.com/eric/tools/dencoder
- Paste the value from step 3 into the text box
- Click the "Encode" button
- Copy the encoded section of the URL, it should look something like this:
- %5B%7B%22column%22%3A%22DSO%20Account%20Name%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22Practice%20Dental%22%5D%7D%5D%20
- Combine the first part of the URL from step 2 and the encoded section of the URL.
- The final result should look something like this:
- https://yourcompany.domo.com/page/338030843?pfilters=%5B%7B%22column%22%3A%22DSO%20Account%20Name%22%2C%22dataType%22%3A%22string%22%2C%22operand%22
In ETL you can make these dynamically for a page. Use the replace text tile or formula tile to create the unique parts of the URL. Then in a formula tile use a CONCAT function to bring the needed pieces together.
More here: Example #1 shows what the syntax would be for multiple columns.If I solved your problem, please select "yes" above
1 - If you would like to create the URL for a page:
Answers
-
Python configuration not needed. We build ours in Magic ETL utilizing the Formula Tile.
Steps:
- If you would like to create the URL for a page:
- Copy the pageID from the page's URL
- Paste it into the link below to replace pageID
- Copy the following text: [{"column":"columnToFilterOn","dataType":"string","operand":"IN","values":["valueFromColumnToFilterTo"]}]
- Replace columnToFilterOn with the EXACT column name from the datasource.
- Replace valueFromColumnToFilterTo with the EXACT value to use for filtering
- Go to this link: https://meyerweb.com/eric/tools/dencoder
- Paste the value from step 3 into the text box
- Click the "Encode" button
- Copy the encoded section of the URL, it should look something like this:
- %5B%7B%22column%22%3A%22DSO%20Account%20Name%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22Practice%20Dental%22%5D%7D%5D%20
- Combine the first part of the URL from step 2 and the encoded section of the URL.
- The final result should look something like this:
- https://yourcompany.domo.com/page/338030843?pfilters=%5B%7B%22column%22%3A%22DSO%20Account%20Name%22%2C%22dataType%22%3A%22string%22%2C%22operand%22
In ETL you can make these dynamically for a page. Use the replace text tile or formula tile to create the unique parts of the URL. Then in a formula tile use a CONCAT function to bring the needed pieces together.
More here: Example #1 shows what the syntax would be for multiple columns.If I solved your problem, please select "yes" above
1 - If you would like to create the URL for a page:
-
I've done the this process, but I did not encode any part of it. The link moves to the desired page but all the filtering is dropped. Thus the question about whether anything else is need. There may be something wrong in my format. I've reviewed half dozen examples but can't get filtering.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Thanks. I was lacking the encode step. If this helps anyone, this statement concatenates three filters as a link.
<a href="https://domain.domo.com/page/*******?pfilters='
CONCAT('
,'%5B%7B%22column%22%3A%22field1_id%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22',`field1_id`,'%22%5D%7D%2C'
,'%7B%22column%22%3A%22field2_id%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22',`field2_id`,'%22%5D%7D%2C'
,'%7B%22column%22%3A%22field3_id%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22',`field3_id`,'%22%5D%7D%5D'
,'" target="_blank" title="Open in Domo"></a>','Note Text Link','')
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
@colemenwilson thank you for these detailed instructions! I was just trying to do this the other day and it was giving me issues. I was missing the encoding part, I followed your steps and now it works!
**If this answer solved your problem be sure to like it and accept it as a solution!
0 -
My pfilters are working but the link does not maintain the date range. If I allow users to set date between…how can I include that as a pfilter so the detail page limits to the same range?
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive