Hello QlikView community,
I'm facing the problem to script a (simple) if-else condition in Qlikview.
I want to pull a trigger when changing the value of a variable (variable event trigger , to be specific the "OnInput" option).
When adding the dynamic update action, I want to change a fieldvalue with the string I just entered into the variable.
The code looks like this :
if '$(vCostCentre)' = '' then
UPDATE ProfitCenterMap
SET ProfitCenterMap.CarveOutCategory ='$(vClassification)'
WHERE LineItem.ProfitCentre = '$(vProfitCentre)' ;
else
UPDATE CostCenterMap
SET CostCenterMap.CarveOutCategory = '$(vClassification)'
WHERE LineItem.CostCentre = '$(vCostCentre)' ;
end if
----------
I read the qlikview reference Manual and wrote the script above according to: https://help.qlik.com/de-DE/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatement...
I also found another Syntax here IF & Else condition :
Simple if function:
if(condition , then , else)
Thank you in advance.
Tuan