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

Patching Nested Gallery(s) Dats Back To SP

Hi,

Struggling with this, I get no error message on my formula..

ForAll(
Gallery8.AllItems,
Patch(
'xxxxxxxxxx Price List',
Defaults('xxxxxx List'),
{
Customer: TextInput1_2.Text,
'Invoice Price': Value(Label10.Text),
'xxxxx Code': Value
}
)
)

I don't need the data from the Parent gallery, that's simply for easier viewing within the app.

Why isn't this working?

Thank you

7 REPLIES 7
RandyHayes
Super User III
Super User III

@LiamR89 

What is it that is not working?  You mention nested Gallery - but can you elaborate more on what you mean by that and how your app is structured as such.  Also, if where are you trying to perform this action that you are having problems with?

 

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Hi @RandyHayes , apologies for the delayed response to this.

What isn't working is my button with the patch code in.

My button is outside of the gallery, On select - I'd like to patch all the data from the nested gallery's back to my SP list.

A couple of images below to try and show clearer.

Gallery1.pnggallery2.png


WarrenBelz
Super User III
Super User III

Hi @LiamR89 ,

@RandyHayes is probably taking Easter off.

The problem is that this is not a single gallery (there is a copy of it in each line of Gallery6).

You need a double ForAll() here - the first on Gallery6 and then Gallery8.

ForAll(
   Gallery6.AllItems,
   ForAll(
      Gallery8.AllItems,
      Patch(
         'xxxxxxxxxx Price List',
         Defaults('xxxxxxxxxx Price List'),
         {
            Customer: TextInput1_2.Text,
            'Invoice Price': Value(Label10.Text)
            'xxxxx Code': Value
         }
      )
   )
)

You are also referring to controls, not fields - I assume there are field from the Data group in Gallery8, if so refer to them rather than the control name. I am also not sure what Value refers to on the last line.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @LiamR89 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz , thank you for your response here, I shall attempt to implement this shortly, I too have had a small Easter break.

"Value" in the last line is a poorly named field, I should look into where it originates and change it.

Hi again, @WarrenBelz .

Believe I may need some more help if possible.

I still can't get this to write back to my Datasource,

I've tried simplifying by only patching one column, to see if that works and then build from there but nothing.

No fields in SP are req'd.


ForAll(
Gallery6.AllItems,
ForAll(Gallery8.AllItems,
Patch(
'xxxPrice List',
Defaults('xxxPrice List'),
{

Customer:"TestingPatch"
}
)
))

No error messages displayed just no action when pressed.

@LiamR89 ,

You need to patch a value that belongs to Gallery8 (there has to be a ForAll of something).

I also cannot test this, but I believe the syntax is correct (there is also not other option I can think of)

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,053)