Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
DamianoD
Contributor II
Contributor II

Create a list of values given some strings fields

Hi everyone,

I have declared a variable as following:

LET vDateSelected = KeepChar($(id_date),'0,1,2,3,4,5,6,7,8,9')

This vDateSelected extracts all parameters passed by ODAG implementation on id_date field.

If i select two dates, such as 20200201 and 20220303 in Selection Template, the Trace vDateSelected =$(vDateSelected); command will give me: 20200201, 20220303.

User can select multiple dates, and I need to extract YearMonth format from all the dates passed; is there any way to load dates given by user in a list whom I could check after?

Thanks,

Damiano

1 Reply
henrikalmen
Specialist II
Specialist II

This should (probably) give you a table with one row for each date (in string format) in the variable (the column name becomes selected_date), if that is what you want? (If autogenerate(1) doesn't work in this context there are other solutions...)

DateSelected: LOAD subfield('$(vDateSelected)', ',') as selected_date autogenerate(1);

Note that your keepchar criteria can be written like this: '0123456789,' (you need to incoude a comma in the string, but you don't need to separate the values with commas).