cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lascough20
Helper I
Helper I

Patch Dropdown Selection to Sharepoint List Column

Hi All

 

I have a form that contains textboxes, dropdowns and cascading dropdowns. I have managed to use the Patch function to transfer the textbox contents to my sharepoint list columns but I am struggling with the dropdowns.

The sharepoint list is called TTSiteInfo, the Patch function (on a "Submit" button) so far is below:

 

lascough20_0-1660916010540.png

Can anyone add to this so the selected dropdown & cascading dropdown values also transfer? 

Thanks in advance

Lee

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@lascough20 

Very good, then based on your Items property, you should have those columns in your patch formula (not seeing them now)

 

They would be something like this (adjust column names as needed):

   Product: ddproduct.Selected.Result,
   Size: ddSize.Selected.<columnYouWantHere>

 

Your ddproduct will only have a Result column because you used Distinct - and that creates a table with a single column record of Result.

Your ddSize will have the full record from the Size list.  So, depending on what column contains the text that you want to store, just change that in the <columnYouWantHere> part.  So if it is something like "Title", then it would be ddSize.Selected.Title

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

12 REPLIES 12
RandyHayes
Super User
Super User

@lascough20 

If they are choice column types in your list, then you simply need to supply the value for the column.

i.e.

   yourChoiceColumnName:  {Value: yourDropdown.Selected.columnName}

 

If your Items property of the dropdowns is based on a table with a Value column, then you only need to supply the following:

   yourChoiceColumnName:  yourDropdown.Selected

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I've got both types so I will give this a try and let you know. 

Thanks and have a good weekend.

Ok, the choice column worked perfectly but the others didn't.

 

There are 3 other dropdowns, two of them cascading and depend on the dd1 selection. All three are populated from different sharepoint lists. I hope this makes sense.

RandyHayes
Super User
Super User

@lascough20 

Yes, but can you provide:

1) your current formula that is not working

2) the Items property of your dropdown controls.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

The working formula is highlighted below. This is a choices column (titled 'Pass') from the TTSiteInfo list.

lascough20_0-1661154072231.png

I tried both options you gave for the other dd's with no joy.

 

The items for the ddlists which will not transfer are:

parent dd (ddproduct), - Distinct(Product,Title)

child dd (Size) - Filter(Size,Product.Value=ddproduct.Selected.Result)

 

Hope this helps.

RandyHayes
Super User
Super User

@lascough20 

Is Pass the choice column??

 

For the ddproduct, the only column that will be available to use is the Result column since you used Distinct on that.

For the Size, your will have all of the columns of the Size list available to you to choose from.

 

But I'm a little lost on what exactly is not working.  You provided what "does" work.  Can you provide an example of what "doesn't" work?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes

Sorry, I guess I'm confusing things with the different dropdowns. Ignore the Pass / ddresult as this is working.

 

Below are the two dropdowns I am having trouble with.

lascough20_0-1661336173373.png

 

parent dd (ddproduct), - Distinct(Product,Title)

child dd (ddSize) - Filter(Size,Product.Value=ddproduct.Selected.Result)

 

I want the results of each to transfer to a Sharepoint list column. Basically I carry out tests on products, all of which have different sizes available. This is recorded using the Powerapp then transferred, along with other information, to a Sharepoint list (by pressing a 'submit' button). Everything is transferring apart from the results of these two dropdowns. 

 

I hope this explains better. Thanks

 

RandyHayes
Super User
Super User

@lascough20 

Yes, I re-read through things and am not seeing what kind of columns you have for Product and Size.  Are they Choice, Lookup or just Text columns?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
lascough20
Helper I
Helper I

They are single line of text columns.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,284)