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

Multiple Patching Issue

Hi All,

 

I have an order system built within powerapps. As part of this, a user can look at an order and update the items within that order to a different status (on hold, cancelled etc). 

 

I have a gallery which the user selects items from, which are then placed in a popup with another gallery (Gallery7). This popup shows the user which items within the order he is updating, allows them to update status and add extra info (eg purchase order numbers etc) if they so wish. Additionally, I have a notes page which creates a new record each time an item is updated, so that the user can see the history of the items being ordered (screenshot attached).

 

Everything works great except the ForAll update to the notes page. The ItemOrderID & ItemOrderIDItem fields (both textboxes) are greyed out and only patch if 1 item is selected into Gallery7. If the user tries to update more than one item at the same time, then the patch to the notes SPO will fail.

 

Can anyone advise of the best way to get this working? Current code is attached.

 

Many Thanks,

 

Chris

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Multiple Patching Issue

Hi @cgreen1983 ,

Is there something error occured when you execute your ForAll formula within OnSelect property of a Button?

 

Based on the ForAll formula you provided, I could not find any syntax error with it. I could not reproduce your issue on my side currently.

 

Please also consider modify your ForAll formula as below:

ForAll(
          RenameColumns(Gallery7.AllItems, "ID", "ID1", "PartDescription", "PartDescription1"),
          Patch(
                    ItemsInOrderNotes,
                    Defaults(ItemsInOrderNotes),
                    {
                       Title: Gallery3_3.Selected.ID,
                       ItemOrderID: ID1                        /* <-- Reference column value from your SP List here directly */
                       ItemOrderIDItem: PartDescription1
                       CommentsOrNotes: ...
                       ..
                    }
          )
) 

 

If the issue still exists, please consider re-generate a new app based on your data source, then try above formula again, check if the issue is solved.

 

Best regards,

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.

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Multiple Patching Issue

Hi @cgreen1983 ,

Could you please share a bit more about your issue?

Could you please show more details about the L_HiddenID control and Title6_2 control within your app?

 

Please check if the L_HiddenID control and Title6_2 control existed in your app. If the issue still exists, please consider restore your app to previous version, then publish it again, check if the issue is solved.

 

More details about restoring app to previous version, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/restore-an-app

 

Best regards,

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.
cgreen1983
Level: Powered On

Re: Multiple Patching Issue

Hi @v-xida-msft ,

 

I have tried a restore, which did not work.

 

L_HiddenID and Title6_2 are both labels pulling in a column from a SPO list, an order ID and item description. Both labels are sat inside the gallery and display the correct information relating to the item(s) within the gallery.

Community Support Team
Community Support Team

Re: Multiple Patching Issue

Hi @cgreen1983 ,

Could you please share a screenshot about the issue within your app?

 

If the L_HiddenID and Title6_2 Label are populate with column from your SPO list, as an alternative solution, you could consider reference the column value within your Patch formula directly rather than reference the Label value.

 

Please consider modify your Patch formula as below:

ForAll(
          Gallery7.AllItems,
          Patch(
                    ItemsInOrderNotes,
                    Defaults(ItemsInOrderNotes),
                    {
                       Title: Gallery3_3.Selected.ID,
                       ItemOrderID: OrderIDColumn                        /* <-- Reference column value from your SP List here directly */
                       ItemOrderIDItem: ItemDescriptionColumn
                       CommentsOrNotes: ...
                       ..
                    }
          )
)

Note: I assume that the Gallery7 connects to the SP List (you mentioned), which the L_HiddenID and Title6_2 label reference values from.

 

Please consider take a try with above alternative solution, check if the issue is solved.

 

Best regards,

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.
cgreen1983
Level: Powered On

Re: Multiple Patching Issue

Hi @v-xida-msft 

 

I have tried the solution you mentioned but I am still not getting any resultes; referencing the column name directlt produces the same results (code attached).

 

You are correct that Gallery7 is connected to an SPO list and the L_HiddenID & Title6_2 labels reference a value within that list.

 

Regards,

 

Chris

Community Support Team
Community Support Team

Re: Multiple Patching Issue

Hi @cgreen1983 ,

Is there something error occured when you execute your ForAll formula within OnSelect property of a Button?

 

Based on the ForAll formula you provided, I could not find any syntax error with it. I could not reproduce your issue on my side currently.

 

Please also consider modify your ForAll formula as below:

ForAll(
          RenameColumns(Gallery7.AllItems, "ID", "ID1", "PartDescription", "PartDescription1"),
          Patch(
                    ItemsInOrderNotes,
                    Defaults(ItemsInOrderNotes),
                    {
                       Title: Gallery3_3.Selected.ID,
                       ItemOrderID: ID1                        /* <-- Reference column value from your SP List here directly */
                       ItemOrderIDItem: PartDescription1
                       CommentsOrNotes: ...
                       ..
                    }
          )
) 

 

If the issue still exists, please consider re-generate a new app based on your data source, then try above formula again, check if the issue is solved.

 

Best regards,

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.

View solution in original post

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: 387 members 6,637 guests
Please welcome our newest community members: