Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Would like to pass through multiple values through multiple variables in the script editor as follows:
Set vMeasure =
(Count({$<[Field1]={'0-35'},
[Field2] = {$1},
[Field3] -= {$2}
[Field4] -= {$3}
[Field5]={$4}>}
measure)
/Count({$<[Field1]={'0-35','>35'},
[Field1] = {$1},
[Field2] -= {$2}
[Field3] -= {$3}
[Field4]={$4}>}
measure));
Where
Field1 values are Field1Value1 and Field1Value2,
The Field2 value is Field2Value1,
The Field3 value is Field3Value1,
The Field4 value is Field4Value1.
If there is only one value this works as follows:
$(vMeasure('Field1Value1','Field2Value1',''Field3Value1,'Field4Value1')
I have tried putting in two values for a field, but had no success.
$(vMeasure(('Field1Value1','Field1Value2'),'Field2Value1',''Field3Value1,'Field4Value1')
Is it possible to do this? If so how does the syntax work?
There is no way I've found to pass a comma as part of a parameter. It's always interpreted as a separator no matter the syntax. What I've done as a workaround is to use a proxy character like '|' and replace() it with a comma in the variable expression.
-Rob
Or you can declare other variable with that values and pass variable name like parameter, then in your function you can use it like
$($1)
Example:
vValues = {'Field1Value1','Field1Value2'}
vMeasure(vValues)
vMeasure = Sum({<[Field] = $($1)>} [MeasureField])
There is no way I've found to pass a comma as part of a parameter. It's always interpreted as a separator no matter the syntax. What I've done as a workaround is to use a proxy character like '|' and replace() it with a comma in the variable expression.
-Rob
Yes, that's the concept.
-Rob
Or you can declare other variable with that values and pass variable name like parameter, then in your function you can use it like
$($1)
Example:
vValues = {'Field1Value1','Field1Value2'}
vMeasure(vValues)
vMeasure = Sum({<[Field] = $($1)>} [MeasureField])
Good morning,
I must solve the following and I do not know how to write it. I have already tried a lot of variants and just do not get on. Could someone please help me.
=Replace($(vSample1($('1000/10ML'|'1000/5ML','PH5','VALID'))),'|',',')
=$(vSample1((=Replace('1000/5ML'|'1000/10ML','|',',')),'PH5','VALID'))
Thank you very much.