The CreatorCon Call for Content is officially open! Get started here.

Autopopulate a field with value provided in record producer

Cindy Sim
Tera Expert

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?

6 REPLIES 6

CindySim_2-1709309298707.png

 

 

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>'
}

 

-Anurag