The CreatorCon Call for Content is officially open! Get started here.

How can Iimit Assignment_Group "is" "javascript:getMyGroups()" to groups that have roles

wbmore
Kilo Expert

I need to restricted the groups that show up in a module to groups the logged in user belongs to. For some users this list is pretty long and they really only need to see data returned based on the groups that have roles. Any suggestions would be greatly appreciated.

 

this gets me half way there and is pretty standard.

Assignment_Group "is" "javascript:getMyGroups()"

 

 

Thanks

5 REPLIES 5

poyntzj
Kilo Sage

We do ours based on Type, which makes this a lot easier


Otherwise i would suggest you look at writing another script include where you would pass a "role" across as the argument and it returns the groups that have that role. and then



javascript:getmyGroups() && groupHasRole('ITSM');


Thank you for the comments Julian. Could you elaborate on how you are using types as I want to be open minded to new ideas.


Subhajit1
Giga Guru

Hi William,


We have set a field (Flag) on the Assignment Group table that is set by a On Before - Insert/Update/Delete Business Rule on the sys_group_has_role table. The BR does a GlideQuery on the sys_group_has_role table with the current group and finds if it have/does not have roles(Records on the same table). If it contains a single role(record), the Flag will remain checked and we can know which all groups has roles.



Thanks,


Subhajit



EDIT:Corrected the Table name


Subhajit,


Thanks for your comments I plan to look at this implementation strategy.



Bruce