Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have a sum using set analysis, but one of the criteria is this: BPLId={'$(Branch)'}
Where Branch is a variable that currently contain the number 1.
But I'd like to be able to use two value: 1 and 3.
I know if I make my set analysis criteria like BPLId={'1,3'} it works, but I cant figure out how to make it work using the variable instead.
Maybe I have to set the values in the variable with some kind of concatenation?
And I should mention that this variable is created manually on the app variables menu, not in the script.
Can anyone shed a light on this?
May be enter like this
1, 3
and then use it like this
BPLId = {$(=Chr(39) & Replace(Branch, ',', Chr(39) & ',' & Chr(39)) & Chr(39))}
It needs to have single quotes around individual Branch
BPLId={'1,3'} -> Incorrect
BPLId={'1', '3'} -> Correct
What is your variable Branch expands to?
Oh, I'm sorry. You are right, {'1','3'} is correct.
Well, my variable is simple just storing the number 1.
I've tried several forms to combine two values, but no success...
Print of my variable:
How do you intend to enter the two values? can you show us this?
That is exactly what I wanna know!
How to enter two values in the variable to reflect on the set analysis.
May be enter like this
1, 3
and then use it like this
BPLId = {$(=Chr(39) & Replace(Branch, ',', Chr(39) & ',' & Chr(39)) & Chr(39))}
It worked like a charm! Thank you so much!
Just to see what is going on, this formula inserts single quotes with Chr(39) and replace the comma with comma and quotes, closing the end with another quote. Right?
If so, I'll be able to use as much values inside my variable as I may need.
Well, thanks again for all your support!
Comma is replaced with ','
So 1, 3 is becoming '1', '3'. Similarly, 1, 3, 5 will become '1', '3', '5'