Reference qualifier on a reference field based on another reference field

mitzaka
Mega Guru

Hi SNC,

Can anyone help me out construct my reference qualifier for the following case:

* I have a table which has two columns - a string, and a reference field (to the same table, like a parent field).

* on the task form, I have two reference fields (first for Category, and the Second for Subcategory)

* I want to place a record producer on the second field (Subcategory), so that it will only show the records which have the Category (first reference field selection) as a parent

I tried with dependent fields, but it wont' work as I think I am in the many to many case.

So I think what I need is some script include and an advanced reference qualifier on the second reference field.

If anyone has done that please share.

1 ACCEPTED SOLUTION

DilipKumar DJ
Kilo Guru

Hi Dimitar,



You should try below line in the ref qualifier of Task Table   subcategory field. Assuming pcategory is the field name of parent category in your custom table.



javascript:'pcategory=' + current.category;




View solution in original post

11 REPLIES 11

ohh yeah...that's right...Sorry man .. I overlooked earlier comments...


Hadyn
Tera Expert

Love this post, but just wanted to add that it wont return any results when the parent is not set.



I made the following change to support that:



javascript:(current.category != "" ? "pcategory="+current.category : "");