Reference qualifier with multiple fields

Geeky
Kilo Guru

I have a reference field pointing to table B on table A. On table A and B I have Company field.

When user Opens a form to submit a record on table A, they see a reference field of table B.

Now that reference field should have two qualifiers active = true and Company = company of table A.

How can I do this? 

1 ACCEPTED SOLUTION
7 REPLIES 7

Prasant Kumar 1
Kilo Sage

Hi ,

You can use reference qualifier with qualifier type as simple and you can use multiple condition type set.

Follow the Steps below:-

1. Right click on the Field And Go to Configure Dictionary.

2. Go to Reference specification section inside.

3. set Use reference qualifier to simple And Required condition Ex:-

active is true AND Company is company.company(dot walking to company table)

4. click update UI Action.

 

If i was able to solve your query please mark my answer correct and helpful.

Thanks & Regards

Prasant kumar sahu

find_real_file.png

 

For Company it should be current.company. How can I add here?

Hi,

Please configure the table A company field dictionary and mention in default value as below :

current.ReferencefieldoftableB.company.

 

Thanks and regards,

Somasekar C

Hi,

In that case you should use advanced qualifier:-

with the syntax as given below:-

javascript:- new ScriptIncludeName().methodName();

 

And Inside the script Include:-

methodName: function() {


var answer = [];
var gr = new GlideRecord('table B');
gr.addQuery('active',true);

gr.addQuery('company',current.company);
gr.query();
while(gr.next()){
answer.push(gr.getValue('field name'));
}
return 'sys_id IN'+answer;


}

 

If i was able to solve your query, please mark my answer correct and helpful.

 

Thanks & Regards

Prasant kumar sahu