Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Singh
New Contributor III

storing Variables in Expressions

hi Folks 

I have to store this expression in a variable and that variable i'll put in qs-variable Extension object because this expression is not working in value bracket ,although this expression is working file in chart,but not in that Extension, so i thought i'll make this expression into  a variable in script and then I'll call it there so anyone can help me that how can we do it 

pick(match(upper(UserID),(SubField(OSUser(),'UserId=',2))),UserCurrency)

please Help me out 

2 Replies
pradosh_thakur
Honored Contributor II

Re: storing Variables in Expressions

let variable_1= pick(match(upper(UserID),upper(SubField(OSUser(),'UserId=',2))),UserCurrency)

 

OR  just create a variable from the UI as the variable in the script will contain the id of the person who reloaded it.

don't miss the = in the front

=pick(match(upper(UserID),upper(SubField(OSUser(),'UserId=',2))),UserCurrency)

Learning never stops.

Re: storing Variables in Expressions

May be you need this

=Pick(Match(Upper(UserID), '$(=SubField(OSUser(),'\',2))'), UserCurrency)