Override UI Policy on Child table?

Greg42
Mega Guru

Hi All,

I have a table that extends from "alm_asset". On "alm_asset" there's a UI Policy Show 'Assigned to' that is inherited by all extended tables.   At the moment I'm using a client script to basically .setDisplay() and .setMandatory() on assigned_to field each time "alm_asset" UI Policy does the reverse. I have created a new UI Policy on my exteded table and tried to do it there either by condition or run script but seems like asset policy overtakes the ownership on that field and extended table policy is not run at all.

Is there an elegant way to override this policy - or policies at all? I don't really like the way I am doing it now.

Cheers

Greg

1 ACCEPTED SOLUTION

Kyryl Petruk1
Tera Expert

Hi Greg,



Override field is used for domain separation override, so that's not gonna help you.


The only way I see it can be done is to remove "Inherit" checkbox from the UI Policy on the parent table and create a separate UI Policy for each child table where this UI Policy should apply.


Not the most elegant solution, but I don't think there is way to override the UI Policy.



Alternatively, you could make a client script that will check the current table and based on that will make a field mandatory / non-mandatory.


View solution in original post

5 REPLIES 5

Steve McCarty
Mega Guru

Greg,



Check the order field on your UI Policy.   I believe if the order number on your policy is higher than the order on the asset policy, your policy should take precedence.   If that doesn't work, try making it a lower number and see what happens.



- Steve


Hi Steve,



I have tried a couple of combinations. Settings order to less, equal or greater than base table UI Policy with and without override field being populated. I thought setting the override field would make a change but ... nope.




Cheers



Greg


Kyryl Petruk1
Tera Expert

Hi Greg,



Override field is used for domain separation override, so that's not gonna help you.


The only way I see it can be done is to remove "Inherit" checkbox from the UI Policy on the parent table and create a separate UI Policy for each child table where this UI Policy should apply.


Not the most elegant solution, but I don't think there is way to override the UI Policy.



Alternatively, you could make a client script that will check the current table and based on that will make a field mandatory / non-mandatory.


Hi Kyryl,



I ended up creating a new field for it. Didn't want to uncheck the box as it would impact other tables that inherit from this one. I then set up my own UI Policies and everything work as I expected.



Thank you guys for help.




Cheers



Greg