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

Select in Field Using Expression in Text Object

Trying to set an action on a text object in Select in Field for the field Client and Search String:

=if(aggr(sum({1<Week={'>=2'}, Flag={0}>} Sales) < 1000 and sum({$<Flag={0}>}  SalesWTD) >= 1000, Client), Client)

Goal is to select all those Client values that fulfill above expression.

Thanks.

5 Replies
Not applicable
Author

your 2 conditions should be separated by '+' symbol not the 'and' keyword so that it becomes a proper set analysis expression.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

='(' & Concat(aggr(if(sum({1<Week={'>=2'}, Flag={0}>} Sales) < 1000 AND sum({$<Flag={0}>}  SalesWTD) >= 1000, Client), Client), ',')  & ')'

Regards,

Jagan

Anonymous
Not applicable
Author

Ramkumar, I tried this but didn't work:

='('&Concat(Aggr(if(sum({1<Week={'>=2'}, Flag={0}>} Sales) < 1000 + sum({$<Flag={0}>}  SalesWTD) >= 1000, Client), Client),',')&')'

Anonymous
Not applicable
Author

Jagan Mohan,

Tried your approach but didn't work:


='('&Concat(Aggr(if(sum({1<Week={'>=2'}, Flag={0}>} Sales) < 1000 + sum({$<Flag={0}>}  SalesWTD) >= 1000, Client), Client),',')&')'

jagan
Luminary Alumni
Luminary Alumni

Hi,

Dont use + sign the expression I given is not having +,

This will give comma separated values of Client satisfying the condition

=Concat(aggr(if(sum({1<Week={'>=2'}, Flag={0}>} Sales) < 1000 AND sum({$<Flag={0}>}  SalesWTD) >= 1000, Client), Client), ',')

If you want to use this in Select In Field trigger then you have to use | as separator and ( ).

='(' & Concat(aggr(if(sum({1<Week={'>=2'}, Flag={0}>} Sales) < 1000 AND sum({$<Flag={0}>}  SalesWTD) >= 1000, Client), Client), '|')  & ')'


This is working for me, if not working for you then attach a sample file.


Regards,

Jagan.