Populate unique values in reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 06:02 AM
Hi,
I need help with advanced reference qualifier.
There are 2 fields - category and bookname. Category is of lookup select box and bookname is of reference field.
Based on category, bookname should populate.
For ex: Category :- fantasy is selected then bookname should populate : Harry Potter, An ember in ashes, The immortals of meluha.
Depending on category value bookname should polulate.
Can you please share advanced qualifier usage for that.
Regards,
AKshata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 07:35 AM
Hi Akshat,
In order to do that, I'm assuming that you also have a category column in your book table. If not, there is no good way to achieve this. By your description, you should be able to use a dynamic reference qualifier. Here's a good posting that explains all three types of qualifiers.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 08:54 AM
Yes, in book table, there are bookname and category fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 09:08 AM
You can use something like the following:
book_category=current.category
where book_category is the column in your books table.
I haven't used this type of structure live, so if it doesn't work, you can add a small function to a client callable script include
filterBooks : function(theRecord) {
return "book_category=" + theRecord.category.toString();
Your reference qualifier would then look like this
javascript: new <script include name>().filterBooks(current)
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 09:18 AM
Please try the below code in reference qualifier of "bookname"
I believe you have used "Name" as 'lookup field' in category variables.
javascript: "category=" + current.variables.Category
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact!