How to show/hide fields based on the other list field reference table column which is true or false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 12:05 AM - edited 10-11-2023 12:05 AM
Hi,
We have requirement in which on a form there is a list collector field called 'policy' referencing to another table. In that reference table there is a 'info required' field which is a true/false . We need show/hide another field 'MNP info' on a form based on the reference table field 'info required'. Any help on how to achieve this.
Regards,
Sagar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 12:17 AM
Hi @Sagar S,
You are going to need to use a client script with script include for this.
What have you already tried?
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 12:19 AM
thank you for your reply, i was about to try that, could you please help me with the code.
Regards,
Sagar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 12:30 AM
Hi @Sagar S,
You could use something like this. Script include is not really necessary.
function onLoad() {
var reference= g_form.getReference('<<fieldName>>', getInfo);
function getInfo(reference){
if(reference.<<fieldName>>== '<<field value>>'){
g_form.setVisible('<<fieldName>>', false);
}
}
}
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 02:50 AM
Thank you for the reply, i'm using onchange client script since the list collector field reference table field record has false and some has true values. but its not working.