I need to show values on reference field based on other field selection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 01:57 AM
Hi,
I need to show values on reference field based on other field selection.
example: if field 1 selection is "other" , field 2 should show values excluding few options
My script below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 02:26 AM
Hello,
Try below filtering for the other option.
filter = 'active=true^type!='+a+'^ORtype!='+b
If my answer helped you in any way please mark it as correct or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 02:47 AM
@Vishwa Pandya19 No luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 02:49 AM
Are you running this in script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 02:38 AM
Hi @Nandini DM ,
Can you please check below script this may helps you
u_getGroupRefQual: function() {
var filter = '';
var a = gs.getProperty('populate.group.based.on.type.a');
var b = gs.getProperty('populate.group.based.on.type.b');
//if field 1 is selected as option "a"
if (current.variables.xxx.getDisplayValue() == 'a') {
filter = 'active=true^type=' + a;
} //if field 1 is selected as option "b"
else if (current.variables.xxx.getDisplayValue() == 'b') {
filter = 'active=true^type=' + b;
} //if field 1 is selected as option "other"
else if (current.variables.xxx.getDisplayValue() == 'other') {
filter = 'active=true^type!=' + a + '^ORtype!=' + b
}
return filter;
},
filter = 'active=true^type!=' + a + '^ORtype!=' + b
Try this filter condition this will work
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak