Passing dynamic data to a popup

Hi Guys,

I have a table that displays data dynamically based on a Date Picker. The column headers and row values are defined based on the date picker. For example, if the date picker is set to Jan-24, the column header will set to Jan-24 and the data in the rows will only show data for Jan-24.

I have logic in the cell that says if the row value for Jan-24 is blank, to add a placeholder “+add” to allow the user to add data specifically for that date. When the user clicks on “+add” a popup appears allowing the user to enter data for that date (Jan-24).

The challenge i have is passing the dynamic date (Jan-24) to the popup. I can pass the parent groups row, but as an entry for Jan-24 doesn’t yet exist, I can’t access it (to populate it). Any ideas on how I can send this dynamic date to the popup?

Note: The date is being calculated by Date Picker.Date Range.End Date.+Months -1. I use this logic to only display the last 6 months of data in my table. I have 6 columns that are dynamically calculated.

All help would be greatfully received!

Thanks in advance,
Mark.

If im understanding correctly, you can use Custom States to pass on the data.
Just add a custom state of type date on the popup, and then use the workflow ‘input value is changed’ (the date picker you’re using might have its own workflow which is probable called something along the lines of ’ Date Picker date is changed ') and then set the value of the custom state to the date selected.

You can then access the custom state from the popup.

Let me know if this helps

1 Like

Thanks so much @nico.dicagno that worked perfectly. To make this work I used a custom state on the popup to hold the date, then used the Set State command on the workflow to set the date to the same logic as I have for my column headers Date Picker.Date Range.End Date.+Months -1.

This works as I need a separate workflow for each column so I can change the logic in each workflow to match the column. Not elegant but it works!

Thanks again @nico.dicagno