cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CodyGros
Level: Powered On

SharePoint Choice and Lookup Fields that allow multiple values

I'm creating a PowerApps solution that interacts with data from various SharePoint 2016 On-Prem lists. On my main list, I have the following two fields:

 

1.  State - Lookup field to the States list and allows multiple values to be selected.

2.  ProjectType - Choice field that allows multiple values to be selected.

 

In my PowerApps solution, I have a gallery configured with my main list as its datasource. I have labels on the gallery to display fields from the items. I'm able to display field values using the following format:

 

ThisItem.<Field Name>

Example: ThisItem.Title

 

For the lookup field, I have the following:

ThisItem.State.Value

It does not display any data and the list items have values for the state field.

 

For the choice field, it is not recognizing the following:

ThisItem.ProjectType

If I add the above in the text property of the label, it shows an error that says "Name isn't valid". 

 

Anyone experience a similiar issue with lookup and choice fields that allow multiple values or am I doing something incorrectly? Any help is much appreciated.

3 REPLIES 3
Community Support Team
Community Support Team

Re: SharePoint Choice and Lookup Fields that allow multiple values

Hi @CodyGros,

I think there is something wrong with the formula that you provided.

If you have enabled "Allow multiple selections" for the State column and ProjectType column in your SP list, within your app, the ThisItem.State.Value formula and the ThisItem.ProjectType formula would return a Table value rather than a Text value, but the Text property of the Label control is required to provide a Text value.

If you want to display the Table value (multiple values) within a Label control of your Gallery, I think the Concat function could achieve your needs. I have made a test on my side, please take a try with the following workaround:1.JPG

Set the Text property of the Label control to following formula:

Concat(ThisItem.ProjectType, Value&" & ")

Or

Concat(ThisItem.State, Value&" & ")

More details about the Concat function, please check the following article:

Concat function

 

In addition, you could also consider take a try to use a Listbox control to display LookUp column values instead of Label control within your Gallery. The screenshot as below:2.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CodyGros
Level: Powered On

Re: SharePoint Choice and Lookup Fields that allow multiple values

Thanks for the reply @v-xida-msft.

 

I belive the issue is occuring because of SharePoint 2016 On-Prem. 

 

StateField.png

 

StateField.png

 

StateField.png

What is odd is that it recognizes the State field but ProjectType does not even show up as an option:

 

StateField.png

I have tested this scenario in our SharePoint Online tenant and everything works as expected. This problem seems to only occur when connecting to an on-prem SharePoint list with lookup and choice fields that allow multiple selections.  I was wondering if anyone has experienced this before with on-prem environment  and this is a known limitiation or if I was doing something incorrectly.

Highlighted
Mayurs05
Level: Power Up

Re: SharePoint Choice and Lookup Fields that allow multiple values

If you have multiselect dropdown values and you want to have conditional visibility you can use the following condition in visible property of that Card or whatever,

 

If(CountIf(DataCardValue.SelectedItems,Value="Selection Required")>0,true,false)

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,025)