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",
                        Id:DataTable11.Selected.ID,
                        Value:DataTable11.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.

View solution in original post

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",
                        Id:DataTable11.Selected.ID,
                        Value:DataTable11.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.

View solution in original post

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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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