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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script variables as fixed string

Good morning,

I have

set DC_Ind_Budget = 'C';

and then

MyTable:
load
$(DC_Ind_Budget)) as [Debit / Credit Indicator];

This results in error "Field not found - <C>". The following doesn´t work neither

''' & $(DC_Ind_Budget)) & ''' as [Debit / Credit Indicator];

Thanks in advance for your suggestions,

Leonardo

Labels (1)
3 Replies
Anonymous
Not applicable
Author

try

MyTable:
load
'$(DC_Ind_Budget))' as [Debit / Credit Indicator];

cesaraccardi
Specialist
Specialist

Hi,

Also check the closing parenthesis at the end, looks like you have one extra.

MyTable:
load
'$(DC_Ind_Budget)' as [Debit / Credit Indicator];

sunny_talwar
MVP
MVP

Or you can do this:

SET DC_Ind_Budget = Chr(39) & 'C' & Chr(39);

MyTable:
LOAD $(DC_Ind_Budget) as [Debit / Credit Indicator];