Requirement is to concatenate the string field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 07:35 AM
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
Thanks in advance,
Chaithra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 12:18 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 10:14 AM
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);
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 10:17 AM
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
Murthy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 04:38 AM
That logic will not work if there are more than two words in a string 🙂