Requirement is to concatenate the string field

Community Alums
Not applicable

Hi Experts,
Requirement is to concatenate the five field values and display the value in one field
1.First part is From the first filed need to select first letter 'A' from the first word and First letter 'A' from the second word. I'm unable to achieve this >> Auto Attendant should give 'AA', If for example Call Queue should give 'CQ'.I'm trying it on on change client script.
2. And the next fields I had worked on it and I'm getting an expected result in Auto Attendant name filed but my aim is to get the value in Upper case for example result should be like "AL-TIR-Operation-EN"

and the final result including 1st and 2nd part I'm expecting is for Auto Attendant it should display as "AA-AL-TIR-Operation-EN"  and If user selects 'Call Queue' in first question Auto Attendant should be "CQ-AL-TIR-Operation-EN"

Kindly help me on achieving this

 

find_real_file.png
Thanks in advance,
Chaithra

8 REPLIES 8

@CHAITHRA T N  Did you try the above?

Feel free to ask if you have further questions or you can mark an answer as correct and helpful to close this thread and benefit future visitors.

 

Regards,

Sumanth

Murthy Ch
Giga Sage

@CHAITHRA T N 

Can you try this logic:

var abc="Abel Tuter";
var val;
for(var i=0;i<abc.length;i++)
{
if(abc[i]==" ")
{
val=abc[i+1];
break;
}
}
gs.info(abc[0]+val);
Thanks,
Murthy

Sometimes my brain takes much time to find a good logic:(

Use below and ignore above one:

var abc="Abel Tuter";
gs.info(abc[0]+abc[abc.indexOf(" ")+1]);

Hope it helps

 

Thanks

Murthy

Thanks,
Murthy

@Murthy Chintalapudi 

That logic will not work if there are more than two words in a string 🙂