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: 
surajap123
Creator II
Creator II

variable value based on other variable

Hi Experts,

I want to change the variable value based on the value change in another variable.

eg- I have conditional load-

if vSource = EMP then vFileName = Employee Data_12345.xlsx

if vSource = ORG then vFileName = Organisation Data_09876.xlsx

I want to put vFileName in the from statement, instead of hardcoding the filename.

Similarly the few FIELD NAMES in each source may change in future, so i want to put the field names of each excel source in variableS and show all variables in UI, so we can have a glance and if required change the field names in the variables. So the new set of field variables value should also be controlled based on value in vSource variable.

The attached app is about same above example.

Please help.

1 Reply
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You should use the value of the vFilename as below.

=If(vSource= 'ORG',' Employee Data_12345.xlsx','Organisation Data_09876.xlsx')

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!