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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Switch syntax, datasources management

Hello everybody !

I'm a new user for the awesome tool QlikView and i have a few questions about it.

  1. First of all, i'm trying to use the switch syntax but i don't think i really understood how it works.


=if(Country='France','FR',
if(Country='Austria','AUS',
Country))

=switch Country
case 'France'
'FR';
case 'Austria'
'AUS';
default
Country;
end switch

2. Datasources management
I would like to create several QVW files for the publishing part.
For instance, a checkAvailability.qvw, after this a createQVD.qvw...
However, i don't know how i can check the availability of the datasources:

For the files, i've thought about the FileSize function but .... not working ...


LET vFileName = 'file1.txt';
LET vSize = filesize($(vFileName));
if($(vSize)>0,MsgBox('ok'),MsgBox('ko'));

error loading image

I think it's enough for a first post 😉

10 Replies
Not applicable
Author

I'm experiencing the same problem with the switch function and I can not find the correct syntax.

More over I would like to change a different variable "VAR" as follow:

=switch Country
case 'FR'
LET VAR = 'France';
case 'UK'
LET VAR = 'UnitedKinkgdoms';
default
LET VAR = 'Else';

end switch

Could you suggest some solution?

Thank you very much for your help.

r.