Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
is there any way to convert selected date into numeric? i want to convert 'GetFieldSelected(date,';')' into a number format?
i tried 'num(GetFieldSelected(Activitymonth,';'))' but its not working.
Hi,
yes i am using current selection in a variable by using if(GetSelectedCount(ReportingMonth)=0,MonthName(AddMonths(Today(),-1)),GetFieldSelections(ReportingMonth,';')), and in sheet action i am reffering to this variable,
could you please advice how make dynamic default bookmark that makes sure that the app opens with previous month selected, but after that it's up to what the users selects??
Ok, but GetFieldSelections(ReportingMonth,';') will give you a semi-colon separated string.How do you use the variable to make it into a new selection? You say you are "reffering to the variable", but how?
See this support video on how to create dynamic default bookmark: https://help.qlik.com/en-US/video/tFyqOigqnUw
Hi @Harish_Qlik,
do you set your variable by evaluating this equation?
If not, do so:
'$(=if(GetSelectedCount(ReportingMonth)=0,MonthName(AddMonths(Today(),-1)),GetFieldSelections(ReportingMonth,';')))'
And afterwards put your variable in the 'Select Values in a field'-action like so:
='$(yourVariable)'
Evaluating your equation is important, because that way the string is set before you delete the user-made selections. The syntax in the second step keeps the value of the variable as a string, needed to make the right selections.
Let me know if this worked for you!
Hello Lennart
the above solution is working only when i select 'Select values matching search criteria' but no in 'Select values from a field' because the above syntax only return string value, and 'Select values from a field' is only accept numeric values, and the sheet action is working only when user select one date value, if multiple date values being selected then the sheet action doesn't work and selection for a sheet automatically disappeared.
Hi all,
Thank you for all your support, now finally i am able get what i was looking for..
here is the solution I have applied:-
First, i created a variable with the expression =if(GetSelectedCount(Reportingmonth)=0,num(MonthName(AddMonths(Today(),-1))),Concat(distinct(num(Reportingmonth)),';'))
and in the sheet action, i choose in the action 'Select values in a field', and in the field section i choose reporting month field, and in the values expression i mentioned the variable name.
the variable will return the default value(which is previous month) upon landing, and whatever i change the selection in the sheet it is carried forward to next sheet.
thanks ones again.