The CreatorCon Call for Content is officially open! Get started here.

Conditions for reference tables for UI Actions

irfanshaik
Tera Contributor

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 - 

 

irfanshaik_0-1708305967664.png

 

This condition works well to show/hide the button -

 

irfanshaik_1-1708306022885.png

 

But this doesnt work - 

 

irfanshaik_2-1708306056956.png

 

I've tried doing 

 

current.getValue("vehicle_model") != 'Test';
current.getValue("case_id.product_features.vehicle_model") != 'Test';

 

1 ACCEPTED SOLUTION

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!

View solution in original post

11 REPLIES 11

Great, just remembered that GlideRecord.getValue() doesn't work on the dot-walked field😅

Naveed_Hussain
Kilo Guru

Try this one:

current.getReference("vehicle_model").getDisplayValue();