value changes based on the other field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2024 11:13 AM
Hi Team,
I want have two fields on form one is choice field and other is the lit collector field, based on the choice i have selected in choice field the other field which has type as list collector should show the options. I have created on change client script to achieve this i can see script is entering into the condition, but it is not reflecting options for second field which has type list collector based on the option selected from 1st field whose type is choice field.
can anyone help me on this?
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2024 11:19 AM
Hi @Prati2
Can you provide the script for us to evaluate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2024 11:28 AM
below is the sample script:-
here 1st field which i choice field is selected in onchange script.
2nd field is list collector type
var ga=g_form.getValue('applicationname');
if(newValue=='A'&& ga=='sys_id'){
g_form.addoption('second field','test','test');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2024 10:17 PM
Hi @Prati2 ,
If you are using below format of addOption:
addOption(String fieldName, String choiceValue, String choiceLabel, Number choiceIndex)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 11:09 AM
can you give example of this one coz when i tried its not working.