Autopopulate a field with value provided in record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2024 06:43 AM
I have variable in record producer; if choice 'A' is selected in that variable, it should auto populate 'Location' field in incident with Value 'B'. Value B is not in choice list for Location. Is there a way to auto populate 'Location' with Value 'B' without adding it to the choice list and without effecting any other choices?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2024 08:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2024 08:09 AM - edited ‎03-01-2024 08:16 AM
The way to achieve this would be to add ABC in the choice list,
Then Write an onload Client script to check if the value selected is not already ABC then remove ABC. This is doe so that no one can select this manually.
if(g_form.getValue('subcategory') !=='ABC')
{
g_form.removeOption('subcategory', 'ABC');
}
Since you have a Record producer, you can add this in the record producer script that if the variable is add then populate ABC in subcategory
//add correct variable name and choice value
if(producer.<variable name> == '<add>')
{
current.<subcategory> == '<ABC>'
}