Advance reference qualifier filter on reference

Akki1
Tera Contributor

Hi,

I have a catalog item which contains a variable "Select Group'' which is reference type to u_groups .

u_groups table sample list view

u_group_name u_owner(Refrence to sys_user) u_coordniator(Reference to u_custom_accounts)
ABC Yousaf Mohit

 

I want the user on portal to select groups only if he is owner/coordinator of that group.

I could use simple filter as u_owner is(dynamic) Me for owner and OR condition for coordiantor but since here coordinator is not refernence to sys_user I cannot use it directly.

Some records in u_custom_accounts is present in sys_user so my idea is to pick coordinator and check logged in user  using UserID and email to u_custom_accounts and sys_user

The accounts table fields are

Obj_type( We can use to compare userid with sys_user)

email

name

Any help how can this be achieved?

1 ACCEPTED SOLUTION

Hello Akki,

Just wanted to check with you, if the above response answered your question. If yes, then please do close this thread/question by marking the appropriate response as correct.

If you still need any further help or guidance on this then please update those on this question.

Thanks

View solution in original post

4 REPLIES 4

Vinayak Belgaon
Mega Guru
Mega Guru

What table is the field u_co-ordinator referring to? The Value "Mohit" stored on the field reference type ?

Mahendra RC
Mega Sage

Hello,

Please check with below reference qualifier on your select group field:

So if you can compare the user in accounts table using some field(I believe you mentioned Name field) with User ID field on sys_user table 

javascript:var userID=gs.getUserName();"u_owner=" + gs.getUserID() "^ORu_coordniator.name=" + userID;

Please mark my respsone as helpful/correct, if it answer your question.

Thanks

Hello Akki,

Just wanted to check with you, if the above response answered your question. If yes, then please do close this thread/question by marking the appropriate response as correct.

If you still need any further help or guidance on this then please update those on this question.

Thanks

ServiceNerd
Giga Guru
Giga Guru