Making certain records show from a reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 12:44 AM
I've got a reference field that has a parent field populated:
The Level field is based on the hierarchy of a record e.g. a parent can have child records and grandchild records.
What I'm wanting to accomplish for the Parent field is that a user can select another record as the Parent, but it must show a list of records that are at the same level as the parent e.g. if I clear out the value of the current Parent, I expect to see a list of records at level 1 and that would be the same at different levels.
Does anyone know how I can accomplish this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 12:57 AM
@matthew_hughes I am assuming that there is a level field defined on the table where the parent record exists. If this assumption is correct then you can define an Advanced reference qualifier on parent field and set
javascript:'u_level='+current.u_level;
Here I am assuming that parent table has a field u_level and the current record also has field with name u_level.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 12:40 AM
Hi @Sandeep Rajput . I tried using 'javascript:'u_level='+current.u_parent.u_level;' within the Parent field
Whilst it does show the records at the correct level. However what I did notice was that if clear out the Parent field and search for records at the level of the parent, non appear:
I was just wondering what else I need to do to stop that from happening?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 01:18 AM - edited 07-03-2024 01:19 AM
@matthew_hughes Try using the following
javascript: if(current.u_parent){'u_level='+current.u_parent.u_level;}