g_form.getValue('state') not working in catalog client onSubmit() script through ServicePortal

Brent L_1
Tera Contributor

We are trying to use an onSubmit() client script to return the value of the state of the task and it returns empty when running through the service portal.

Just create an onsubmit() script against a catalog task record.

ui type = all

isolate script =false

function onSubmit() {
    g_form.addInfoMessage("Action:"+g_form.getActionName()); 
    g_form.addInfoMessage("State:"+g_form.getValue('state'));
}

 

The first message returns the action name, but the second message returns empty.

 

Anyone have ideas on how to make this work?

 

 

 

2 REPLIES 2

Oleg
Mega Sage

Probably it's a typing error only. Why you use 

g_form.getValue('assigned_to')

if you need return the state (not assigned_to value)? Try to use

g_form.addInfoMessage("State:"+g_form.getValue('state'));

Brent L_1
Tera Contributor

Sorry my example didn't match the subject.  But, it doesn't really matter because neither of the options actually work.