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

Set value of field not present on form using client script.

ganeshexpert
Kilo Contributor

Is it possible to set the value of field which is not present on form but on table using client script.

 

Thanks in advance.

8 REPLIES 8

Subhajit1
Giga Guru

Hi Ganesh,


If you are worried about the Field's visibility on the Form, then you can simply Add the Field to the Form and then Define a UI Policy that will keep the Field Hidden Perpetually.


Now you can work on your Field with Regular Client Scripts.



Thanks,


Subhajit


lwatts
Kilo Contributor

Hi,



I have created a new field on my form called Requestor email.   I would like to auto populate this field with the value from email field (auto populated from email address field on user table) on the same form if the value of another field is true.   I have created a Business rule but cannot select new field is the same as the other field, so I would like to use a script.   I have been unable to get this to work, any suggestions on how to get this working properly.



condition:   current.u_send_update==true


script:


(function executeRule(current, previous /*null when async*/) {


  // Add your code here


  setValue(current.u_requestor_email, u.email);


})(current, previous);



Thanks,



Lorenzo


lwatts
Kilo Contributor

would also like to clear value of the field if the field is false.


wqlink
Kilo Contributor

Have you found the solution that works without using any client script?