Filtering by Date from Url

I have an app that lists cases. I am able to succesfuly filter by dates (start and end) which are saved on the pages custom states. I am trying to send those values to another page to filter a similar list - but it doesnt work. Any tips would be helpfull

Thanks




With URL parameters – send your start/end values as UNIX timestamps rather than Bubble Date objects. For example, in your “Go to page my_list” action set:

  • Key: start_date
    Value: main’s Date Start extract Unix Timestamp
  • Key: end_date
    Value: main’s Date End extract Unix Timestamp

What’s a UNIX timestamp?
It’s simply the number of seconds (or milliseconds) that have elapsed since 00:00 UTC on January 1, 1970. By converting your dates to a plain number, you avoid any serialization issues when passing them in the URL.

On the “my_list” page you’ll now receive two numeric parameters. Unfortunately, Bubble doesn’t include a built-in workflow action to turn a UNIX timestamp back into a Date object. To convert them you’ll need a free “Unix → Date” plugin (search the Plugin library for “Unix to Date” or “Timestamp Converter”). Install that, then in your page’s “Do when page is loaded” (or in any repeating group filter), convert the parameter value back to a Bubble date and you can filter your list exactly as before.

Thanks for the quick response. I get the first part - but I don’t know how to convert the value back to Bubble date in my list - Repeating Group Filter


  • Install the Plugin

  • Add the “Unix Time Convert” plugin to your project.
    image

  • Create a Hidden Group with Custom States

  • Place a hidden group on your page.

  • Add two custom states to this group, both with the type Date (e.g., Unix_StartDate and Unix_EndDate).

  • Set Up the Workflow

  • Go to the Workflow tab and create a “Page is Loaded” event.

  • Inside this workflow, add:

    1. UNIX timestamp to date (Step 1) → Get the start_date parameter from the URL (as a number) and convert it to a Bubble Date.

    2. UNIX timestamp to date (Step 2) → Do the same for the end_date parameter.

    3. Set State (Step 3) → Send the converted dates to the custom states you created in Step

  • Use the Dates for Filtering
  • Now that you have proper Date objects (start_date and end_date), you can use them anywhere you need.
  • For example, in a Repeating Group filter:
    • startdate_filter > Group Unix List's Unix_StartDate
    • enddate_filter < Group Unix List's Unix_EndDate

This topic was automatically closed after 70 days. New replies are no longer allowed.