cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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.
Highlighted
Helper II
Helper II

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.

Highlighted
Community Support
Community Support

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.
Highlighted
Helper II
Helper II

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

Highlighted
Community Support
Community Support

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,492)