Expand my Community achievements bar.

SOLVED

Typeahead filtering - can't restrict user selection to within one group

Avatar

Level 4

Hi all,

 

I can't get it to work so decided to reach out for some expert help !

 

I'm using a 'typeahead' field in a custom form to allow users to select someone from a particular group that they have been working with.

 

So the Typeahead 'Referenced Object Type' is User

 

I then want to limit the user names selectable to only those in one 'group'

 

so I add this into the filter to specify the group

 

group:ID=66d8ccc9005443e4cb8c60dd1b292bb4
group:ID_Mod=in

 

But it doesn't work.

 

They are of course not selecting a group from the typeahead - but I thought this text mode was appropriate.

 

Or do I have to relate it back up a level to the user - using EXISTS:

 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @GeraintJo 

 

two options: 

  1. If you're looking for the users HOMEGROUP - per @Nijs_Gold_23's response use homeGroupID=66d8cc.....
  2. if you're checkign ALL groups, try userGroups:groupID=66d8cc.....

 

userGroups is a collection of "userGroups" - where a user group is a linking object that points to the actual group.

View solution in original post

6 Replies

Avatar

Community Advisor

there's a link on the typeahead field when you edit a filter, that leads you to this article on using text mode here:

https://experienceleague.adobe.com/en/docs/workfront/using/reporting/reports/text-mode/edit-text-mod...

 

I think the critical point at the start of the article is really key -- recommending that you build as much of your filter as possible in standard mode, before converting it to text mode.

 

I feel like the documentation really used to be better about stating this: have you tried (or considered trying) building a user report incorporating the filter that you would like your user typeahead to have, and once you've gotten your desired result in the report, transferred the filter over to your typeahead filter (convert standard filter in the report to text mode and then copy/paste)?

Avatar

Level 4

Hi,

 

yes I did try that - and to be honest that's where i got the code from I am trying.

 

The complex thing (in my mind !) is that the user is typing in a 'user' name - but the login in the typeahead applies the that users Group.

 

Ie they should only be able to enter Users names who belong to a specific Group.

 

I can't see how creating a report for this first replicates that. 

Avatar

Community Advisor

that's really weird, because I can't get that text mode to show up in my user report. i.e. when I copy and paste your text mode into a user report, and convert it back to standard mode, it goes blank. Are you sure maybe you didn't accidentally wander into a different report by mistake?

 

The two possible standard mode filters I see in a user report would be for home group and other groups. So if you're seeing a "group" option you could be in a wrong report or maybe your report got corrupted somehow?

Avatar

Level 7

Hi @GeraintJo 

 

You should try homeGroupID or roleID/s, cause this works for me all the time instead of filtering on bigger umbrella(group).

 

Please mark my reply as 'Correct Reply' if this helped you, and to help others.

 

Thanks in advance!

Avatar

Correct answer by
Community Advisor

Hi @GeraintJo 

 

two options: 

  1. If you're looking for the users HOMEGROUP - per @Nijs_Gold_23's response use homeGroupID=66d8cc.....
  2. if you're checkign ALL groups, try userGroups:groupID=66d8cc.....

 

userGroups is a collection of "userGroups" - where a user group is a linking object that points to the actual group.

Avatar

Level 4

Thanks Sven

 

homeGroupID=    did the trick