Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Pedro_Rodriguez
Contributor III
Contributor III

Concatenate field+variable in set analysis

Hi all,

I have a set analysis expression where I must concatenate a variable plus a field but I cannot make it work

=Only({<FIELD1={$(=$(vL.Model)&FIELD2)}>}FIELD3)

Can anyone help?

Thanks a lot in advance!

3 Replies
tresesco
MVP
MVP

Ideally, this should work, if you have single value in scope for FIELD2. Could you share a sample qvw showing the issue?

jonathandienst
Partner - Champion III
Partner - Champion III

Generally, the RHS expression is an aggregation (sum, max, etc). This is because the expression is evaluated once, before the sheet object is built.

It looks like you are trying to a do a row-by-row comparison, and set expression do not work that way.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sushantwanjari
Contributor
Contributor

Lets say, you need to compare two fields such that

F1 = F2 & '_123'

eg. A_123 = A & '_123'

Define variables:

v_Suffix = '_123'

v_Filter = '''' & Concat(F2,$(v_Suffix)&''',''')&$(v) & ''''


Now use v_Filter in Set expression

=Only({<F1 = {$(v_Filter )}>} F3)

Hope it help you..

-Sushant