Need to add query in the existing reference qualifier

Keerthi Lakshmi
Tera Contributor

Hi There!!

 

I have a task where I have to configure one field, it is taking values from Vendor Table and it is querying based on Given assignment group. Now I need to add one condition that only active vendors should be shown in the list(i.e. The records only having active is true to be populated). 

 

The existing script is javascript: new returnVendor().query(current.assignment_group);

 

How can i add one more condition over here?  Can anyone guide me to achieve this?

4 REPLIES 4

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

You should go to the scripts include 'returnVendor' (and to the function 'query') and make the change there. I'm sure there you will see a glide record and you just need to add the Active condition in it.

-Anurag

ayush_glob
Tera Contributor

Hi @Keerthi Lakshmi 

Please check the script include returnVendor and add the addActiveQuery() in the query() function after gliderecord the table.

var gr = new GlideRecord("tablename");
gr.addActiveQuery();
gr.query();
if (gr.next()) {
   gs.print();
}

 Please mark the solution as solved if it helped you.

swathisarang98
Giga Sage
Giga Sage

Hi @Keerthi Lakshmi ,

 

Could you please share the script include code or screen shot of the code ?

 

In the script include returnVendor you need to add your query something like below,

<Glide Record objectname>.addQuery('active',true);

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

@Keerthi Lakshmi Thanks for marking my answer as helpful. If it helped you in any way please accept the solution so that it will be beneficial to the future readers with the same query.

 

Regards,

Swathi Sarang