cancel
Showing results for 
Search instead for 
Did you mean: 

How to split a sentence in dictioanry & display in RadioButtonGroup byKey

Former Member
0 Kudos

Hi,

I have a sentence in my dictionary as "India & America are my countries".Now i want to keep radio button to this and display by splitting the string as

India & America

are my

Countries

in the design time.

So can anyone please tell me how to break a sentence and how to use "&" symbol in the dictonary

Regards

Padma N

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Padma,

I could not understand what your actual requirement is but i could help you regarding spliting the text. You split a text at a specified delimiter say " "(blank space) or any thing by using split method. Below the code for that

String text = "India&America aremy countries"

String[] words=text.split(" ");

wdContext.currentContextElement().setA(words[0]);

wdContext.currentContextElement().setB(words[1]);

wdContext.currentContextElement().setC(words[2]);

then you will get

India&America

aremy

countries

Regards

Raghu

Former Member
0 Kudos

Hi,

I dont want to split the data programatically.

While writing in the dictioanry i have to split il into 3 lines.

i tried using \n..But it is not working ..

Can anyone suggest me how to do this in the dictionary itself

Regards

Padma N