Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis with len( variable)

Guys,

I've built a set analysis for a textbox but i'm having troubles in checking a variable lenght.

sum( {<'$(=vVariable)' = {"=len($(=vVariable)) =0"} >} DIMENSION)

Does anyone have an idea?

Thanks in advance.

9 Replies
Clever_Anjos
Employee
Employee

Please add this formula as an expression to a straight table with no label on it

Mouse over the header and check how your expression is beeing evaluated

Anil_Babu_Samineni

How you define here vVariable

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Anil,

The vVariable here is a number.

Anonymous
Not applicable
Author

Everything seems right in this. but it is not working.

Clever_Anjos
Employee
Employee

Would you mind posting a screenshot of your test?

Clever_Anjos
Employee
Employee

vVariable returns a number?

'$(=vVariable)' = {} it´s supposed to be a fieldname so you can use as a Set Analysis expression


Anonymous
Not applicable
Author

Is there a way of putting a number on it?

Anonymous
Not applicable
Author

The function sum( {<'$(=vVariable)' = {"=len($(=vVariable)) =0"} >} DIMENSION)

returns  =sum({<'' = {"len()"=0}>} DIMENSION)  when I set the variable's value null.


I think the set analysis cannot retrieve a value because it cannot evaluate a null value in the left part of equation (=sum({<'' = ).


Do you have an idea to overcome that?

Thanks in advance.

Clever_Anjos
Employee
Employee

Let´s start from the beginning...

What´s your intention? Maybe undestanding what you trying to do we can help a little better

A set analysis expression is supposed to have :

Sum({<aField={"Some search expression"}>}Value)

You can have a variable on left side of expression since this variable returns a fieldname