How to determine 'instanceOf' or class of a reference field on the client-side

craig_granier
Giga Contributor

So I have a custom table of which I have a check-box field and a reference field.     The reference field is to the task table.   I have a requirement that if the value in the task reference field is a problem ticket to hide the check-box field.

I'm looking for something akin to the 'instanceOf()' to determine if the referenced object is a problem ticket...is there something similar for g_form that I can use.   Didn't see anything in the wiki.

Any ideas?

Thanks.

3 REPLIES 3

Michael Fry1
Kilo Patron

I assume your custom table extends from task table and you didn't mention your field name. You could use a UI Policy and dot walk to Parent.fieldname contains 'problem'. If true, hide the checkbox field.


No my custom table does not extend the task table.   It is a 'from scratch' table...it just contains a reference to the task table.   Sorry if I wasn't clear.


No problem, you don't have to dot walk to the parent table. You can still go UI policy, task table contains 'problem'. Pretty simple. I think that's easier than client script.