Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
When I send a parameter to function variable, and this parameter is a set analysis with two conditions, the function not work.
Example:
I create the bellow function:
vSomaMil = $1+1000
If I execute the function with the example bellow, the function work.
$(vSomaMil(Sum(Expression1)))
$(vSomaMil(Sum({<Alpha={'B'}>}Expression1)))
But, if I send like this:
$(vSomaMil(Sum({<Alpha={'B'},Dim1={'A'}>}Expression1)))
The function don't return anything.
Would anyone know why this problem occurs?
The problem is the comma in your parameter
$(vSomaMil(Sum({<Alpha={'B'},Dim1={'A'}>}Expression1)))
When a variable is used with parameter, it assumes that each parameter is supplied separated by comma. In your case you don't want the expression to think that these are two separate parameter.
I have seen few solutions where the input parameter is supplied with a different character and then replaced with a comma using a Replace() function
Replace($(vSomaMil(Sum({<Alpha={'B'}#Dim1={'A'}>}Expression1))), '#', Chr(44))
I am not sure if this is the right syntax or not, but something on the similar lines is what you need
Hi,
would you be able to attach some sample data or qvf here ?
Sure...
Attached.
Sure...
Attached.
The problem is the comma in your parameter
$(vSomaMil(Sum({<Alpha={'B'},Dim1={'A'}>}Expression1)))
When a variable is used with parameter, it assumes that each parameter is supplied separated by comma. In your case you don't want the expression to think that these are two separate parameter.
I have seen few solutions where the input parameter is supplied with a different character and then replaced with a comma using a Replace() function
Replace($(vSomaMil(Sum({<Alpha={'B'}#Dim1={'A'}>}Expression1))), '#', Chr(44))
I am not sure if this is the right syntax or not, but something on the similar lines is what you need
Super awesome, glad you were able to figure it out on your own.