Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getfieldselections in Script Load Statemanet

Hi, I have an inline table (SelectCustomer), which i use a MultiBox to select different customer, than i create a variable (VSelectCustomer) which uses Getfieldselections from SelectCustomer to store the selection. Now i need to use the information from VSelectCustomer to use a IF LOAD in the script like the one below:

IF wildmatch('*VIVO*','$(VSelectCustomer)') then

SITES:

LOAD

.....

ENDIF

The problem is that in the ScripLoad the variable VSelectCustomer does not shows it selection from SelectCustomer, shows only the code =getfieldselections(SelectCustomer)  .
There is any way to make the LOAD Scrip read the selection?

I already try change the '$(VSelectCustomer)' with $(VSelectCustomer) and just VSelectCustomer, and in all cases it returns the code ( =getfieldselections(SelectCustomer)) and not the values from the selection.

1 Solution

Accepted Solutions
Not applicable
Author

Just found a Solution in the link below. Getfieldselections direct in the variable do not work in the LOAD script, but with Triggers it works! https://community.qlik.com/thread/65816

View solution in original post

3 Replies
JonnyPoole
Employee
Employee

I'm not sure i agree that this is possible.

If the variable values are static... then they should be accessible in the script.

But when the script is running, the data model is in the process of being flushed and renewed. An expression based variable should not really be able to be calcualted on a complete data model . The exception is if the expression is a valid script expression... in which case its calculated based on the script context

I'm trying to think how you can make the saved selection accessible to the script ... but i can't think of one.

Not applicable
Author

I was using before an input box to get the value to the variable and it was working OK in the Script. Now i changed to MultiBox, so i can use the MultiSelection feature, and add the value to the variable by getfieldselections. Seams that formulas in the variable do not work in the Script. Do you know any way to read a MuiltSelection from a field and use the result in the Script? BR

Not applicable
Author

Just found a Solution in the link below. Getfieldselections direct in the variable do not work in the LOAD script, but with Triggers it works! https://community.qlik.com/thread/65816