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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
martynlloyd
Partner - Creator III
Partner - Creator III

Nested dollar expansion

I have created a function:

Set fReduceName = Replace(Replace(Replace(Replace(PurgeChar(Lower(PurgeChar($1,' ,./-_+()£$!*')),chr(39)), 'plc',''),'ltd',''),'limited',''),'&','and');

This is great, works and makes the scripts much neater.

I now want to use the result of the first function inside another function, in the same Load segment.

Set fOrganisation = SubField( ApplyMap('Organisations', $1,'Unknown'), ';', $2);

where $1 is the result of fReduceName.

The first parameter is the Organisation Name in both functions

Regards,

Marty.

1 Solution

Accepted Solutions
rubenmarin

Hi Martyn, try with:

Set fOrganisation = SubField( ApplyMap('Organisations', $(fReduceName($1)),'Unknown'), ';', $2);


You need to call the variable with the parameter, it will pass the parameter to the inner variable

View solution in original post

1 Reply
rubenmarin

Hi Martyn, try with:

Set fOrganisation = SubField( ApplyMap('Organisations', $(fReduceName($1)),'Unknown'), ';', $2);


You need to call the variable with the parameter, it will pass the parameter to the inner variable