cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
usaman45
Helper III
Helper III

How to know select item is a group not people

Is there is a way to know when user select a name in the combox box is a group not  people?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @usaman45 ,

 

According to your description, the point is Claims field of the person column.

You could use the Claims field to distinguish whether it is a person or a group.

 

I've made a test for your reference:

1\ This is my list LIST35

v-xiaochen-msft_0-1607939425826.jpeg

 

// Test is the person column. The first record is the group.

 

2\ Add a label control and set its Text property to:

If(StartsWith(Last(FirstN(LIST35,1)).Test.Claims,"i:0#.f|membership|"),"people","group")  // Determine whether the first record is a person or a group.

 

3\ The result is as follows:

v-xiaochen-msft_1-1607939425826.png

 

 

Best Regards,

Wearsky

View solution in original post

3 REPLIES 3

@usaman45 

Office 365 Users Connector to our awareness only support to get Users and not Microsoft 365 Groups when we just tested it now. So how you will know it is it always return Users and no Microsoft 365 Groups when you use that Connector.

 

Please share about this:

 

1) Does your ComboBox have both Users and Microsoft 365 Groups? Or does it have only Users?

 

2) How did you get the ComboBox to show Microsoft 365 Groups and Users both?

usaman45
Helper III
Helper III

The drop down list field is from sharepoint so it shows people and group for user to select.

v-xiaochen-msft
Community Support
Community Support

Hi @usaman45 ,

 

According to your description, the point is Claims field of the person column.

You could use the Claims field to distinguish whether it is a person or a group.

 

I've made a test for your reference:

1\ This is my list LIST35

v-xiaochen-msft_0-1607939425826.jpeg

 

// Test is the person column. The first record is the group.

 

2\ Add a label control and set its Text property to:

If(StartsWith(Last(FirstN(LIST35,1)).Test.Claims,"i:0#.f|membership|"),"people","group")  // Determine whether the first record is a person or a group.

 

3\ The result is as follows:

v-xiaochen-msft_1-1607939425826.png

 

 

Best Regards,

Wearsky

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (2,829)