- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2016 12:49 PM
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.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2016 08:36 AM
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;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2016 11:43 PM
In reference qualifier
javascript:'referencefieldname='+current.variables.firstvariablename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2016 12:53 AM
kalai - this does not help me, as I dont have variables in that case (or maybe I misunderstood you).
What I have is two fields on the TASK form
Task Category - this is a reference filed to a custom table 'Task Categories' which looks like this:
Category is a string, then Parent Category is a reference field (so that I can have parent-child hierarchy of categories.
And then from the task form above, the field Task Sub-Category is again a reference field, but which aims to show only the categories from the table which have a parent the Category specified in the Task-Category reference field.
This is the reference qualifier I need to get.
Hope you can help me now that I brought in the screenshots:)
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2016 03:23 AM
Hello Dimitar,
Try this:
javascript:!gs.nil(current.category) ? 'parent=' + current.category : '';
Category name is a string, but the field category in the task table is a reference field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2016 03:35 AM
This should work provided you change the field names.