Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Patching items from a gallery acting as a new form.

(0) ShareShare
ReportReport
Posted on by

Hello, 

I'm using a gallery, with a combo box in it and a text box, this controls get added dynamically into the gallery when clicking on add new line button, because it doesn't have predeterminated amount of rows of info to be added.

so I'm having a problem when I'm trying to save, the items from the gallery to the sharepoint List and I want this items to be created as a new item, as if this gallery was a form creating new items.

I'm using this on the on select button: 

ForAll(
    carga_hs_gal.AllItems;
    Patch(
        'Propuesta Carga de Hs ';
        Defaults('Propuesta Carga de Hs ');
        {
            Productos: Productos_combo.Selected;
            Horas: Hs_txt
        }
    )
)
But it gives me a patch error (operation not valid)
tried changing also what I use into this other version: 
Patch(
    'Propuesta Carga de Hs ';
    ForAll(
        carga_hs_gal.AllItems;
        {
            Productos: Productos_combo.Selected;
            Horas: Hs_txt
        }
    )
)
But the patch keeps giving an error. If I use the same to save it into a new collection, it saves fine, but why not into a sharepoint list?
Any idea what could it be or how to fix it?
Categories:
  • MarTorres07 Profile Picture
    on at
    Re: Patching items from a gallery acting as a new form.

    Sorry I figured out already it was a dumb mistake lol just didn't realize didn't do the .text after the text input.

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Patching items from a gallery acting as a new form.

    @MarTorres07 -

     

    1. Could you take a screenshot of the error message.

     

    2. As a test, can you check if patching a single record also returns an error?

     

    Patch(
     'Propuesta Carga de Hs ';
     Defaults('Propuesta Carga de Hs '),
     {
     Productos: Productos_combo.Selected;
     Horas: Hs_txt
     }
    )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard