Skip to main content

Notifications

Power Apps - Error Handling
Unanswered

Error when use Patch function

(0) ShareShare
ReportReport
Posted on by 98
Hi, I have an app with table as a vertical gallery.

OnSelect functions on the + button:
ForAll(
  Sequence(1),
  Patch(
      'Gallery Table',
      Defaults('Gallery Table'),
      {
          Signature: "",
          GUID_Form: If(IsBlank(TextInputCanvas8), varGUID, TextInputCanvas8.Value)
      }
  )
);
Patch(
  'Gallery Table',
  ShowColumns(
      colGridUpdates6,
      Date,
      'Temp check',
      Comments,
      'Payroll No.',
      Signature,
      Hours,
      Minutes,
      AWB,
      GUID_Form,
      ID
  )
);
Set(varReset6,false);
Set(varReset6,true);
The rows are created in the Sharepoint list (Gallery Table). When I need to create a new row, I click the + button.
By clicking Save, the data is sent to the list.
But sometimes for some reason two rows are created, although I click the + button once.
Does anyone know what the error might be?
  • WarrenBelz Profile Picture
    WarrenBelz 143,867 on at
    Error when use Patch function
    Hi @xvzms
    Why not just do it all in one Patch - add the collection then create a new record
    Patch(
       'Gallery Table',
       Table(
          ShowColumns(
             colGridUpdates6,
             Date,
             'Temp check',
             Comments,
             'Payroll No.',
             Signature,
             Hours,
             Minutes,
             AWB,
             GUID_Form,
             ID
          ),
          {
             Signature: "",
             GUID_Form: If(IsBlank(TextInputCanvas8), varGUID, TextInputCanvas8.Value)
          }
       )
    );
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard

Featured topics