Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
madhuqliklondon
Creator II
Creator II

Create a flag in the script

Hi all, 

I am trying to create a flag in the script, the scenario is Sample company has subscriptions for customers, inventory, customer emails and in addition, employees can buy a subscription as well. So the flag I am trying to create is where subscription belongs to an employee then Yes else No. The join or lookup will be customer email to employee email. 

I prefer not to use mapping load to keep the optimized load in load script and also I have to convert the email fields to Upper() as they are inconsistency with regards to email alphabet characters. 

Thanks in advance.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Since you have to already use the Upper() function, I would definitely use a mapping table as long as you have such table with employee IDs for which you can create the flag.

Alternatively, you can use the EXISTS() function in the field and use it for the flag:

Employees:
LOAD Upper(email_address) FROM File.qvd (qvd);

Subscriptions:
LOAD *,
If(Exists(Upper(email_address)), 1, 0) AS flag.Employee // field with the same name as the one loaded previously elsewhere in the script
//else see help link below
FROM File.qvd (qvd);

More reference on the Exists(): https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Inter...

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Since you have to already use the Upper() function, I would definitely use a mapping table as long as you have such table with employee IDs for which you can create the flag.

Alternatively, you can use the EXISTS() function in the field and use it for the flag:

Employees:
LOAD Upper(email_address) FROM File.qvd (qvd);

Subscriptions:
LOAD *,
If(Exists(Upper(email_address)), 1, 0) AS flag.Employee // field with the same name as the one loaded previously elsewhere in the script
//else see help link below
FROM File.qvd (qvd);

More reference on the Exists(): https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Inter...

View solution in original post