- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 05:29 PM
Hello,
I am trying to apply condition on a UI action to show/hide the button. But the condition only works for default fields on the form and not for the fields that i've added by dot walking from reference tables
For instance, in this form, first_name is a field on the table where as vehicle_model is dot walked from another table -
This condition works well to show/hide the button -
But this doesnt work -
I've tried doing
current.getValue("vehicle_model") != 'Test';
current.getValue("case_id.product_features.vehicle_model") != 'Test';
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:14 PM
Nice, then you can change the condition of the UI Action to this:
current.case_id.product_features.vehicle_model.getDisplayValue() != 'Test';
Let me know if it works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:03 PM
FYI, you can check the log created by gs.info in the System Log [syslog] table.
Let's try one at a time and see where it's going wrong.
gs.addInfoMessage('Case: ' + current.case_id.getDisplayValue());
gs.addInfoMessage('Product feature ' + current.case_id.product_features.getDisplayValue());
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:09 PM
ok, these two lines -
give me -
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:12 PM
and this -
gs.addInfoMessage('Case: ' + current.case_id.getDisplayValue());
gs.addInfoMessage('Product feature ' + current.case_id.product_features.vehicle_model.getDisplayValue());
gives me -
which is the correct value of Vehicle Model in the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:14 PM
Nice, then you can change the condition of the UI Action to this:
current.case_id.product_features.vehicle_model.getDisplayValue() != 'Test';
Let me know if it works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 07:19 PM - edited 02-18-2024 07:19 PM
Yes, that worked.
So the issue was that i was using -
current.getValue("case_id.product_features.vehicle_model") != 'Test';
instead of -
current.case_id.product_features.vehicle_model.getDisplayValue() != 'Test';
Appreciate you helping me through this!