Populate unique values in reference field

akshatapatil354
Tera Contributor

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

4 REPLIES 4

johnfeist
Mega Sage
Mega Sage

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.

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Yes, in book table, there are bookname and category fields

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&colon; new <script include name>().filterBooks(current)

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Prince Arora
Tera Sage
Tera Sage

@akshatapatil354 ,

 

Please try the below code in reference qualifier of "bookname"

I believe you have used "Name" as 'lookup field' in category variables.

javascript&colon; "category=" + current.variables.Category 

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact!