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

Replace multiple values to one value

how to set two values in variable for text object action?

Select Variable: vCountry

Select Value: 'India' and 'BHARAT' it does not work for me tried pick match but still not working

i have India and BHARAT in my Region field, i mean some file has BHARAT and some files has India.

i want when BHARAT is selected it should show India\BHARAT same when BHARAT selected show India\BHARAT in button.

can we replace two values with one value by using REPLACE function?

1 Solution

Accepted Solutions
veidlburkhard
Creator III
Creator III

Hi Nilanjan,

you have to enter your selections like this:

Select A and B.jpg

Hope this helps

Burkhard

View solution in original post

9 Replies
Kushal_Chawda

In script create a new field

if(match(lower(Region),'india','bharat','India',Region) as New_Region

Not applicable
Author

hi kush,

thanks for your reply, but it does not work, cant we do in text object action?

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this in script

LOAD

*,

if(match(lower(Region),'india','bharat','India',Region) as New_Region

FROM DataSource;


No use New_Region field as filter.


Hope this helps you.


Regards,

Jagan.

Kushal_Chawda

I quite don't understand if user is going to select the Region from listbox then why you need text object and button

Not applicable
Author

Hi,

If your intention is to combine two values into one, then below script will help you.

=Replace(Replace(Country,'Bharat','INDIA'),'India','INDIA / BHARAT') as Region,

If you take the list box REGION the you will seen combined value for India and Bharat as INDIA / BHARAT.

Regards,

Pavan.

sasiparupudi1
Master III
Master III

use an if condition

if (lower(region)='india' or lower(region)='bharat','india\BHARAT',region)

hth

Sasi

jsingh71
Partner - Specialist
Partner - Specialist

See this:

India.png

=if(Region = 'India' or Region ='Bharat', 'India/Bharat',Region)

veidlburkhard
Creator III
Creator III

Hi Nilanjan,

you have to enter your selections like this:

Select A and B.jpg

Hope this helps

Burkhard

Not applicable
Author


Hi guys thanks a lot for all the useful answers.