Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Evan0211
Creator II
Creator II

Setting a basic string variable in load script

I am working on a new app and trying to focus on using the load script to load all of my variables.

I have a basic category variable that I want to set equal to Books so I did this:

SET vCategory = 'Books';

When I am doing a sum on the category, I am doing this:

=sum(If(
([Category] =  $(vCategory) 
)
,
[VALUE]))

However, this is expressing to if [Category] = Books (without the single quotes around the variable value. How do I get it to see the variable as a string?

Labels (1)
1 Reply
Kushal_Chawda

@Evan0211  try to use it in set expression instead

=sum({<
[Category] = {'$(vCategory)'}
>}
[VALUE])