Export to Excel with date tokens parameters

Hi,
We are using tokens to set the default date on a date range parameter filter. When we export to excel with parameters it is displaying the date as " > = Beginning of current month & <= End of current month". This is useless as the user still has no idea what this could be. I need this to export the actual dates.
Is there an option to automatically convert this or can I do this via a script?
Thanks,
Jen

I would love to have such functionality.

At the moment, the best I can do is to use a script on the export to put the resolved tokens into the filename, so I get “blah blah report Sep’18-Sep’19.xlsx” as my export file.

Hi Jennifer,

By default, we do export token caption instead of the date value as you would like to. However, you can achieve this custom behavior through a bit of scripting, using the parameter value’s resolve method.
https://www.dundas.com/support/api-docs/js/#API%20Reference/dundas/data/RangeMemberValue/Methods/resolve.html

Or follow the steps below:

  1. Open properties panel of the filter control
  2. In the filter control’s “Parameter value changed” action add the script
    2
  3. In the script you can have something like this:

/* MetricSet ID 02d2649d-08a4-4658-8f36-892525335083 – need to be changed to your MetricSet ID
parameterCalendarRange1 - name of the filter control - need to be changed to your filter Name */
parameterCalendarRange1.control.parameterValue.resolve(‘02d2649d-08a4-4658-8f36-892525335083’).done(function (i) {
parameterCalendarRange1.control.parameterValue = i;
});

  1. Select the tokens in the date filter
  2. Open token menu beside the To Value box and select the “Include To Value” option
    3
  3. Test the excel export

Your excel export should work as expected now, with the resolved values being shown correctly.

Please, let us know if it helps you to achieve the desired result

Thank you,
Max

2 Likes