- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 08:47 AM
Hi Team,
Customer is created the property (choice_value) and define the value like 2014,2015,2016,2017 and want the same value in field as drop down on cost form under PPM module.
I created the Business rule and store the Value in scratch pad like scratchpad. Choice=gs.getProperty (choie_value) and use the scratch pad value on load client script but I need know that how I can split the value of scratchpad.choice in client script. Plz. Suggest.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 04:30 AM
Hi Anil,
The first business rule for scratchpad should also be added in Incident table. Can you please change the table to incident and then test it once?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 08:55 AM
Hello,
You can use the split function to split values. Try the following script and let me know
var choices = g_scratchpad.choices.split(",");
for(var i =0; i< choices.length; i++){
g_form.addOption("field_name", choices[i], choices[i]);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 09:26 AM
Make sure you cleanup all the choices by using clearOptions() and build the list. I would also index to the function
var choices = g_scratchpad.choices.split(",");
g_form.clearOptions('field_name');
for(var i =0; i< choices.length; i++){
g_form.addOption("field_name", choices[i], choices[i], i);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 04:30 AM
Hi Anil,
The first business rule for scratchpad should also be added in Incident table. Can you please change the table to incident and then test it once?