Skip to content Skip to footer

Get reference choice list values using form script

In the below form script we are getting values from the “reference choice list” and adding them into “Textbox” widget.

function getvalue(ws)
{
  if(ws.getWidgetValue("City") == '' || ws.getWidgetValue("State") == '' || ws.getWidgetValue("Country_3")
  == '' ||  ws.getWidgetValue("Address_line_1") == '')
    return;
var vcity = JSON.parse(ws.getWidgetValue("City"));
var vstate = JSON.parse(ws.getWidgetValue("State"));
var vcountry = JSON.parse(ws.getWidgetValue("Country_3"));
var vadds = ws.getWidgetValue("Address_line_1");
var vc = ", "; 
ws.setWidgetValue("Full_Address_2",vadds+vc+vcity[0]['fot']+vc+vstate[0]['fot']+vc+vcountry[0]['fot']);
ws.reloadUICell("Full_Address_2");
}

In the above form script example, “City”, “state”, and “Country” were reference choice lists we have added those values in the “Full address” textfield.

Was This Article Helpful?

0
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami