Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Currently, in my set analysis, I have the field selection hardcoded -->
ex: [STATE]={'NJ', 'MA', 'CA'}
I need to turn this into a variable because I want the selections to be different based on a condition.
However, when I try to create a variable
vState_Group1 = {'NJ', 'MA', 'CA'}
I get, missing "}". I've tried writing the expression with and without the equal sign.
Thanks.
The set analysis sytax requires the {}
If you change vState_Group1 = 'NJ', 'MA', 'CA'
That would make your set expression using the variable look more like this:
{$(vState_Group1)}
-ws
Can you describe more details about your conditions because there are ways to allow selections to apply in Set Analysis
thanks. still results in an error though, garbage after expression ","
Hi @bmac1
Try this
-Variable
Name : vState_Group1
Definition : =Replace('NJ,MA,CA', ',', Chr(39)&','&Chr(39))
And in set analysis use variable with a single quote!
Please reply! thanks!
Commas within a variable will be treated as a parameter-delimiter and not as variable-content. In your case you could avoid the commas by using another set analysis syntax like:
vState_Group1 = (NJ|MA|CA)
Beside this it's much easier to use field-selections instead of variables, for example:
< Field = p(Field) >
or if not the origin field should be used for the selections a second independent field from an island-table might be applied, like:
< Field = p(MyIslandField) >
Open the offending expression in the edit window and look at the preview at the bottom of the screen. If you cannot see what is wrong with it in the preview, then post a screen clip of it.
-ws