Include Reference Qualifier script in Script include and call it in Reference Qualifier override

Piyush Dwivedi
Tera Contributor

I have just copied the filter conditions of a Service table in reference qualifier, now i need to include it in script include and then call it in Reference qualifier override, please suggest.

What will be possible script include?

1 ACCEPTED SOLUTION

Hi @Piyush Dwivedi ,

Actually this is not helping whatever you are sharing

we are trying to help you but the info you are sharing is not really helping.

 

you could have shared all these details like what you have done so far the scripts that you have used and some screenshots of configurations you have made and issue you are facing

 

 

this should not be taking this long and these many attempts in providing you the solution especially for a question like this

 

 

I would suggest you to to go through below blogs for on how to post question in community

Tips on asking Question On Community

10+ Tips for writing a quality community question

 

please don't post duplicate question when there is already a discussion going on the same issue and I have seen the scenario is same in other threads as well

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

8 REPLIES 8

Chaitanya ILCR
Kilo Patron

Hi @Piyush Dwivedi ,

 

You can follow these steps

1. create script include with a method which returns a filter condition (in this example I'm returning active=true filter (query) )

 

ChaitanyaILCR_0-1751545804446.png

example script used

 

var refQualTest = Class.create();
refQualTest.prototype = {
    initialize: function() {},

    refQual: function() {
        return 'active=true';
    },

    type: 'refQualTest'
};

 

 

and now go to the dictionary override record if there is one(or create a new dictionary override)

and check the Override reference qualifier checkbox

and Reference qualifier as highlighted

 

the format is javascript followed by ":"(colon) call your script include and method (new refQualTest().refQual())

 

ChaitanyaILCR_0-1751546102457.png

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Thanks for quick response @Chaitanya ILCR 

I have a lengthy query (Filter condition) such as Class is x and State is operational, so in that case what should be the script include?

Can we not copy overall query and add it in Script include?

Hi @Piyush Dwivedi 

 

if it is just normal filter with any dynamic conditions associated you can directly put the filter in the reference qualifier. unless the length of filter characters is longer than the reference qualifier field and you don't want to update the max length property of the reference qualifier dictionary

 

let's say you want to filter out the active users having emails you don't have to use script include for that you can just take the encoded query and put in the reference qualifier field

ChaitanyaILCR_1-1751548094748.png

 

 

ChaitanyaILCR_0-1751547999250.png

 

you use the script include in reference for more complex filter conditions 

let's you want to only show the user of logged in user company alone (it's just a small example)

that's where you use the script include the reference qualifier

 

 

I would say please share your requirement and what you've done so far and where you feel you are stuck. share these details, I will try to provide the answer

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

 

 

 

Thanks for response @Chaitanya ILCR .

Is there any option where we can just call out overall encoded query in script include?

since it is lengthy and having filter conditions for multiple classes.