- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2017 08:30 AM
i would like to add text to single line text based on the select box options i select.
ie
var cat = g_form.getValue('domain');
if(cat == 'eee')
{
g_form.setValue('serverName', "DC");
}
Another Catalog Client Script
var cat = g_form.getValue('serv_env');
if(cat == 'dev')
{
g_form.setValue('serverName', "T");
}
}
I want variable to have text "DCT" however with these scripts it over writes the old text. i would like it to be added to the existing text.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2017 08:36 AM
Replace another catalog CS as below
var cat = g_form.getValue('serv_env');
var serName = g_form.getValue('serverName');
if(cat == 'dev')
{
var cat = g_form.getValue('domain');
var ser = serName +'t';
g_form.setValue('serverName', ser);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2017 08:59 AM
Let me know if that answered your question. If so, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. Thank you
How To Mark Answers Correct From Community Inbox
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2017 09:03 AM
i appreciate that.
then is there a way i merge two variable text into 1 variable. so it looks something like this.
serverName = DEVT
userInput = WEBMAIL
output = DEVTWEBMAIL

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2017 09:05 AM
Script will be something like
var serName = g_form.getValue('PASS SERVER NAME COLUMN NAME');
var usrinput = g_form.getValue('PASS USER NAME COLUMN NAME');
g_form.setValue('Third field column name', serName + usrinput);