Creating Page Analyzer Links

Hi,

Need help with page analyzer links

I have a dashboard with about 6 different filters (two of them have been shown below). I have "xxx" ed out the actual ids for obvious reasons.


I have two questions

1) How can I pass multiple filter values and multiple field filters over to the new page. I have two fields in my example below but even that fails to work.

2) What kinds of chart objects should I use to get the page analyzer link working. So far only the html table works (with just one field and one filter value).


Can anyone help me out?

Bease mode calculation:

CONCAT('<a href="https://xxxxxxxxx.domo.com/page/xxxxxxxxxxx'

,'?pfilters=[{%22column%22:%22Opportunity%22,%22dataSourceId%22:%xxxxxxx%22,%22dataType%22:%22string%22,%22operand%22:%22IN%22,%22values%22:[%22'

,`Opportunity`

,'?pfilters=[{%22column%22:%22Package.Name%22,%22dataSourceId%22:%22f7307a70-2c25-4165-bdaa-4742ea6f5499%22,%22dataType%22:%22string%22,%22operand%22:%22IN%22,%22values%22:[%22'

,`Package Name`

,'%22]}]" target=%22_blank%22>'

,'3rd Party KPI'

,'</a>'

)

Answers

  • GrantSmith
    GrantSmith Indiana 🔴
    edited March 17

    Hi @b_rad

    1 - You should be able to pass in multiple filters for different columns to filter your data. It's outlined under https://knowledge.domo.com/Engage/Sharing_Content_Outside_of_Domo/Using_Pfilters_to_Apply_Filters_from_URL_Query_Parameters_to_Embedded_Dashboards

    Looking at your URL it appears you're passing in the pfilter variable twice which would cause issues. You want your pfilters to be combined in the same JSON object you're passing through to your pfilter

    ?pfilters=[
    {
    "column":"Opportunity",
    "operand":"IN",
    "values":["TE","WR"],
    },
    {
    "column":"Package.Name",
    "operand":"IN",
    "values":["Amsterdam","Anchorage"],
    }
    ]
    

    This is all back of napkin untested but it'd end up looking something like this (removing the second ?pfilters=[ and replacing it with a comma - also ending your first list of values with a closing ] and closing out your first pfilter definition with } ) :

    CONCAT('<a href="https://xxxxxxxxx.domo.com/page/xxxxxxxxxxx'
    
    ,'?pfilters=[{%22column%22:%22Opportunity%22,%22dataSourceId%22:%xxxxxxx%22,%22dataType%22:%22string%22,%22operand%22:%22IN%22,%22values%22:[%22'
    
    ,`Opportunity`
    
    ,'%22]},{%22column%22:%22Package.Name%22,%22dataSourceId%22:%22f7307a70-2c25-4165-bdaa-4742ea6f5499%22,%22dataType%22:%22string%22,%22operand%22:%22IN%22,%22values%22:[%22'
    
    ,`Package Name`
    
    ,'%22]}]" target=%22_blank%22>'
    
    ,'3rd Party KPI'
    
    ,'</a>'
    
    )
    
    
    


    2 - Only Table (HTML or Mega) cards are capable of utilizing HTML links as part of the card display.

  • b_rad
    b_rad ⚪️

    Hi GrantSmith,

    Thanks a lot for your reply. Now I am able to pass multiple fields as filters to the linked page.

    However, like you had mentioned, this feature works only in HTML table (i was not able to get it to work in the Mega table). So basically its like each row has only one filter value for Opportunity and Account associated with it. Now I am not sure how do I achieve passing multiple values for one column from a html table.

    So I have definitely made progress but still need some help.

    Thanks.

  • GrantSmith
    GrantSmith Indiana 🔴

    Hi @b_rad

    You'd need to aggregate your data such that you have each value separated by "," (including the quotes) so that each value is properly escaped when you pass it in as a pfilter argument list.

  • b_rad
    b_rad ⚪️

    Can you provide an example?

    Since I can use only a html table, even if I aggregate and include the beast mode calculation as a column, each row still has only one value for each dimension in the filter.

    I think I am missing something.

  • Jessica
    Jessica ⚪️

    I have done this exact formula and it still brings me to the new page, puts the filter on the page, but the card has an error. I have both sides as an html card. I saved the beastmode to the dataset, is there something I am missing?


    CONCAT('<a href="https://xxxxxx.domo.com/page/xxxxxxxxx'

    ,'?pfilters=[{%22column%22:%22Line of Business Level 3%22,%22dataSourceId%22:%228377d31b-580b-473f-bbe5-956b70277394%22,%22dataType%22:%22string%22,%22operandtype%22:%22IN%22,%22values%22:[%22'

    ,`Line of Business Level 3`

    ,'%22]}]" target=%22_blank%22>'


    ,`Line of Business Level 3`


    ,'</a>'

    )

  • b_rad
    b_rad ⚪️

    Hi Jessica,


    Your beast mode calculation should look like this....


    CONCAT('<a href=''https://xxxx.domo.com/page/xxxxxx?pfilters=['

    ,'{"column”:”A”,”datasourceid":"xxxxxx”,”dataType":"string","operand":"IN","values":["'

    ,`A`

    ,'"]},'

    ,'{"column”:”B”,”datasourceid”:”xxxxx”,”dataType":"string","operand":"IN","values":["'

    ,`B`

    ,'"]},'

    ,'{"column”:”C”,”datasourceid”:”xxxxxxx”,”dataType":"string","operand":"IN","values":["'

    ,`C`

    ,'"]}'    

    ,']'

    ,'''target="_blank" title=“title”>’,’display value,’</a>'

    )


    Hope this helps.