Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a selection list like this:
and i want to fill a variable with the value which is selected (blank, 'Jour.qvd' or 'Mois.qvd').
How can i do this?
I have tried GetCurrentSelections but this only works in expressions and not in the script so i don't know how to do this.
Does anyone have an idea please?
Thanks,
Best Regards,
Loïc
try with
=only([Nom du fichier])
if you want to set the variablein the script
let variable='=only([Nom du fichier])';
you can use concat or p (possible values). However, you need to fill the variable that then will be used in the next reload? is that the case?
Are you trying to pass the variable from UI to script? or you have a field with these values and in you need your script to take these values and use it. if that is the case then try using FOR loop.
If you want a selection in a list to influence script execution, then use an InputField and attach a variable to the field. Other lists based on fields will not survive the script start as the first thing the script will do is wipe the data model clean.
Good luck,
Peter
the thing is, when i write this in the script:
set fichier = GetCurrentSelections([Nom du fichier]);
it doesn't execute the function GetCurrentSelections but like a simple string
All i want to do is to find a way to differentiate which value is selected because it must have another treatment.
If 'Jour.qvd' is selected, i have to execute some lines of my script and if 'Mois.qvd' is selected, i have to execute other lines of my script.
Well, your first remark boils down to the difference between SET and LET.
Use the trick with the InputField to control script behavior. It's pretty simple and works lilke a charm.
Peter
You cannot use, chart functions in the script. As Peter said, you have to create a input field and attach the [Nom du fichier] to this variable. and then pass this variable to script and use in IF and ELSE condition.
See this example.
Good luck,
Peter