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

Concatenating a table field and free text

Hi All,

I have an expression where i need to concatenate a table field and a free text. Here is an example,

=if([Dim Store Attr CD] = 'OBJ_PARAM_DIAMOND', 'DIAMOND' - [Dim Store Attr Val])

Here [Dim Store Attr CD] and [Dim Store Attr Val] are fields from a table and 'OBJ_PARAM_DIAMOND' is a field value and i Just want to Concatenate the free text, 'Diamond' and a hypen '-' with the field name [Dim Store Attr Val]

Is it possible to do. I m not getting the expected result using above expression.

Regards,

Malathi

5 Replies
Gysbert_Wassenaar

try: 'DIAMOND - ' & [Dim Store Attr Val]


talk is cheap, supply exceeds demand
Not applicable
Author

Hey thanks, It worked. Now another confusion,

I need to use 2 or more conditions here like below to make different combinations. Is it doable?

=if([Dim Store Attr CD] = 'OBJ_PARAM_DIAMOND' , 'DIAMOND - ' & [Dim Store Attr Val]) or if([Dim Store Attr CD] = 'OBJ_PARAM_GOLD' , 'GOLD - ' & [Dim Store Attr Val])

Regards,

Malathi

Gysbert_Wassenaar

A nested if should do the trick:

=if([Dim Store Attr CD] = 'OBJ_PARAM_DIAMOND' , 'DIAMOND - ' & [Dim Store Attr Val], if([Dim Store Attr CD] = 'OBJ_PARAM_GOLD' ,  'GOLD - ' & [Dim Store Attr Val]))


talk is cheap, supply exceeds demand
Not applicable
Author

Nested if is working for 2 conditions, but i have three conditions to check. Is it doable?

Not applicable
Author

Can u tell me how to incorporate third condition as my condition is not working for 3 if loops,