How to set values into single line text based on another field selection

Mahidhar Sai1
Tera Contributor

I have requirement where I need to populate values into single line text "AD Groups to remove" based on another reference field. But in the single line text field we have a default value. So we need add another values based on the field based on the selection
I have written the below on change client script but i am unable to add the default vale .. it showing the below

Can you please suggest on this

find_real_file.png

find_real_file.png

 find_real_file.png

3 REPLIES 3

Anand Shukla
Mega Guru

Hi,

If you want to set the value from Reference field to single line text then you need to use:

 

g_form.setValue('ad_group_to_remove',adGrp.getDisplayValue());

 

I am guessing your adGRP is a reference field right?

Let me know if it solves your issues or not.

 

Thanks

Anand

"environment" is reference field and " AD groups to remove" is single line text text field. In the single line text we have already a default value. Now i need to populate another values based on "environment" selection include with with default value. 

I am not able populate values include with default value in the single line text.
I have posted the screenshot above

Create a new variable and hide it using UI policy and store the default value in that fields then using the onchange client script fetch the value of both the fields and populate in the Single line text.