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

Adding powerapps dropdown list from a different sharepoint list

would love some help with the following issue. I have a sharepoint list with various lookups to other lists that I have used for my PowerApp. One of the lookup lists is jobnumber that will be available as a dropdownn in the app. The Jobnumbers have two statuses (active and completed) and we wan to only show the 'active' items in the dropdown of the powerapp.

I updated the items property for the default dropdown menu to point directly to the source: ShowColumns(Filter(JobNumberList,JobNumberStatus="active"),"se_Jobnumberid") 

 

When testing the screen it filters correctly BUT it doesnt save the value against the dropdown on save.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Adding powerapps dropdown list from a different sharepoint list

Hi @apples,

 

You cannot use the record from source list to save to the lookup column in destination list. To achieve this, you will have to use Patch function to submit items rather than SubmitForm function.

 

For patch usage with lookup field, we need to patch a record rather than a value. 

The Record must match the Schema defined under your lookup field, if you select the se_Jobnumberid field from source list, then you must also contain this row's ID field. So you must get as least 2 columns from source list when selecting the value. Dropdown control can only have one column's value, so you will need to use control like ListBox to achieve this. 

 

Insert a Data Table control, set its Items property to:

 

Filter(JobNumberList,JobNumberStatus="active")

And only make the "se_Jobnumberid" column show.

 

 

Use the following formula to submit the record:

 

Patch(List2,
         Defaults(List2),
        {Lookup:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        IdSmiley Very HappyataTable11.Selected.ID,
                        ValueSmiley Very HappyataTable11.Selected.Title}
              }
         )

 

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.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Adding powerapps dropdown list from a different sharepoint list

Hi @apples,

 

You cannot use the record from source list to save to the lookup column in destination list. To achieve this, you will have to use Patch function to submit items rather than SubmitForm function.

 

For patch usage with lookup field, we need to patch a record rather than a value. 

The Record must match the Schema defined under your lookup field, if you select the se_Jobnumberid field from source list, then you must also contain this row's ID field. So you must get as least 2 columns from source list when selecting the value. Dropdown control can only have one column's value, so you will need to use control like ListBox to achieve this. 

 

Insert a Data Table control, set its Items property to:

 

Filter(JobNumberList,JobNumberStatus="active")

And only make the "se_Jobnumberid" column show.

 

 

Use the following formula to submit the record:

 

Patch(List2,
         Defaults(List2),
        {Lookup:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        IdSmiley Very HappyataTable11.Selected.ID,
                        ValueSmiley Very HappyataTable11.Selected.Title}
              }
         )

 

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.
deeleyt
Level: Power Up

Re: Adding powerapps dropdown list from a different sharepoint list

Hi - Great answer - Now show the whole thing so that people needing the answer can get a grip of what you are saying. It is better to show the whole example than just clips.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 184 members 5,003 guests
Please welcome our newest community members: