Carrying date range in hyperlink

Options

I am using pfilters to drilldown on multiple columns. But the set date range isn't carrying when the link is clicked. How can I open an anchor link so the new page has the date range the first page had?

CONCAT('<a href="https://domain.domo.com/page/1234567898?pfilters=' etc

** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓
    Options

    Beast Modes have no sense of the global date filter on the page so you can't set it to whatever is currently filtered. You may be able to leverage a custom Domo Brick and some javascript to attempt to get the filter options when the filter occurs with the onFilterUpdate event handler.

    More information on this can be found here: https://developer.domo.com/portal/e947d87e17547-domo-js#domoonfiltersupdate

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • trafalger
    Options

    Here's the Domo knowledge base article: https://domo-support.domo.com/s/article/360042933114?language=en_US , but I'm not sure if you can use dates there. Do you have example code?

  • ArborRose
    Options

    I use a concat like the one above but my screen has confidential data I cannot show.

    My link works just fine…it opens the page and performs filters on three fields. The problem is..my original screen is a summary, and the user can set the date filter. And I don't know how to carry the date to the next page.

    Assume the following image represents my report. On the left, the first page with the summary amounts. Clicking office 002, production 4 will take you to another page (aka image on the right) to show the breakout of the amounts. If the filter doesn't carry over the date range, the details screen won't limit the dates to match the original page.

    I'm referring to the date range setting in the top right of a dashboard

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • ArborRose
    Options

    My concat statement looks something like this (redacted to show different field names)

    CONCAT('

    <a href="https://mydomain.domo.com/page/***********?pfilters='
    ,'%5B%7B%22column%22%3A%22office_id%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22',`office_id`,'%22%5D%7D%2C'
    ,'%7B%22column%22%3A%22author%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22',`author`,'%22%5D%7D%2C'
    ,'%7B%22column%22%3A%22customer%22%2C%22dataType%22%3A%22string%22%2C%22operand%22%3A%22IN%22%2C%22values%22%3A%5B%22',`customer`,'%22%5D%7D%5D'
    ,'" target="_blank" title="Open in Domo"></a>

    ','Details','')

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • trafalger
    Options

    Oh I see what you mean. I'm not sure if you can pass date grains via pfilters but I don't think you can

  • GrantSmith
    GrantSmith Coach
    Answer ✓
    Options

    Beast Modes have no sense of the global date filter on the page so you can't set it to whatever is currently filtered. You may be able to leverage a custom Domo Brick and some javascript to attempt to get the filter options when the filter occurs with the onFilterUpdate event handler.

    More information on this can be found here: https://developer.domo.com/portal/e947d87e17547-domo-js#domoonfiltersupdate

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • ArborRose
    Options

    Wow….that's a significant thing for Domo leave out. I should not have to create all kinds of work arounds like bricks for a simple thing like maintaining the date range.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • Alex_G
    Alex_G Member
    Options

    @GrantSmith is there any update on this? I have a parent page that hyperlinks to several child pages and I need to be able to carry over the global date filter. Users are very confused by seeing a completely different date range when clicking through to a child page.