- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 11:40 AM
Hey gang
This is the situation.
I have a field; let's call it (field_c). It is a choice field. It needs to auto-populate, based on the selections from two 'reference fields' (field_a) & (field_b).
So for example field_a = Ice Cream & field_b = banana then field_c = Banana Split
field_a = vanilla cone & field_b = chocolate then field_c = Dipped vanilla cone.
I have no idea how to make this happen? Does it need coding or is there a simpler way to make this happen?
Thanks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 12:17 PM
Hi Morrix,
You have to create 2 onChange Client script for both field_a and field_b. write script as below
function onChange() {
//Type appropriate comment here, and begin script below
var A= g_form.getValue('field_a');
var B= g_form.getValue('field_b');
if (A== 'Ice Cream'){
if(b== 'banana'){
g_form.setValue('field_c','Banana Split');
}
you can do like this, but again its depend on your business requirement, if every time A and B filed value get changed and based on that you need to update c field then you can go for data lookup https://www.youtube.com/watch?v=X6hWzFAodiE
Kindly mark correct and helpful if applicable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 12:17 PM
Hi Morrix,
You have to create 2 onChange Client script for both field_a and field_b. write script as below
function onChange() {
//Type appropriate comment here, and begin script below
var A= g_form.getValue('field_a');
var B= g_form.getValue('field_b');
if (A== 'Ice Cream'){
if(b== 'banana'){
g_form.setValue('field_c','Banana Split');
}
you can do like this, but again its depend on your business requirement, if every time A and B filed value get changed and based on that you need to update c field then you can go for data lookup https://www.youtube.com/watch?v=X6hWzFAodiE
Kindly mark correct and helpful if applicable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 01:22 PM
I am going to go with the recommendation of going with Data Lookup.
I appreciate your help with this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 12:18 PM
Hi there,
If you want to avoid coding you could use Flow Designer instead, something like below should work:
If this answer is helpful please mark correct and helpful!
Regards,
Christopher Perry
Regards,
Chris Perry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 01:21 PM
Thank you so much, Christopher. I think that based on the business requirements and the number of different choices. I am going with the recommendation from Chetan.
I appreciate the time you took to send this response.