cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PhilD
Kudo Kingpin
Kudo Kingpin

Collect complex field type value like PersonField.Email

I can build a collection like this to show a two-column table where "Attendee" references a SharePoint person column set to accept only a single value. 

 

 

ClearCollect(colEventIDs, 
   ShowColumns(Attendees,
    "Event_x003a_ID","Attendee"))

 

How would I return a third column to show someting along the lines of "Attendee.Email"?  Attendee.Email returns an error "The specified column does not exist".

 

CollectComplexFieldType.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @PhilD,

 

The only supported way to do this in PowerApps today is using a Form in conjunction with a lookup control, which will fill in the necessary fields for that Person or Group record. In your case, the reason why the formula is not working is because the schema is incompatible with the schema expected by SharePoint.

 

For example, Sharepoint expects something like this for a Person record:

 

  {'@odata.type':text, Claims:text, Department:text, DisplayName:text, Email:text, JobTitle:text, Picture:url}

 

So I would like to suggest that you use a Form control to connect to your SharePoint list, and add the person and group column to a data card. For example, the data card text box name is DataCardValue1, then you could use below formula to collect the email of the person:

Collect(colEventIDs, DataCardValue1.Selected.Email)

I just tested and this works for me.

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-monli-msft
Community Support
Community Support

Hi @PhilD,

 

The only supported way to do this in PowerApps today is using a Form in conjunction with a lookup control, which will fill in the necessary fields for that Person or Group record. In your case, the reason why the formula is not working is because the schema is incompatible with the schema expected by SharePoint.

 

For example, Sharepoint expects something like this for a Person record:

 

  {'@odata.type':text, Claims:text, Department:text, DisplayName:text, Email:text, JobTitle:text, Picture:url}

 

So I would like to suggest that you use a Form control to connect to your SharePoint list, and add the person and group column to a data card. For example, the data card text box name is DataCardValue1, then you could use below formula to collect the email of the person:

Collect(colEventIDs, DataCardValue1.Selected.Email)

I just tested and this works for me.

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-monli-msft.

 

This is very useful information as I have run up against this a few times in the past. I realized that the schema was not compatible with what I wanted to do but I couldn't get anything to work. Using your method makes sense to me. Thanks!

 

 

Hello @v-monli-msft ,

I have come across the same issue now after 3 years of this post. 

Does the collection still have to be through a form control for complex columns like Person field. ?  

My SP list has Participant Name as a Person filed but in the PowerApp it is just a Text input. Still the collect function gives a blank on submit. 

I wish there could be a solution to this. 

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,917)