Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

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

Or you can do this:

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

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