web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch not updating Sha...
Power Apps
Unanswered

Patch not updating Sharepoint list on first attempt

(0) ShareShare
ReportReport
Posted on by 18

Folks,

I have a sharepoint list as a database with the following columns:

  • Quarter
  • Project
  • Name
  • Date/Time

Within PowerApps the user is choosing from the following two columns:

  • Quarter
  • Projects

He then hits a button and the his "Name" and actual "Date/Time" will be stored to the relevant columns in the Sharepoint list as described above, whereas the following command will be executed:

 

Concurrent(
Patch(
'IKS 2022';
MELDUNGEN.Selected;
{MELDUNGDURCH:User().FullName};
{MELDEDATUM:Now()}
);
Reset('Auswahl_KST|KTR');
Reset(Auswahl_QUARTAL);
Notify("Daten werden gespeichert, bitte warten!";NotificationType.Success;1500))

 

Unfortunately, on the first attempt the patch function is not working and no data will be stored in the sharepoint list. With the second attempt it works flawless. "App.OnStart" and "delayed loading" is disabled but the problem still exists.

 

Any suggestions would be appreciated.

 

Daniel

Categories:
  • victorcp Profile Picture
    2,350 Moderator on at

    Hello Daniel,

    Which component 'MELDUNGEN' is? and are you selecting it before the patch?

  • Gochix Profile Picture
    1,937 Moderator on at

    If you have the record in the SP list already then yes you can use the patch you already use:

     

    Patch(
     'IKS 2022',
     MELDUNGEN.Selected,
     {
     MELDUNGDURCH:User().FullName,
     MELDEDATUM:Now()
     }
     )

     

     

    However if MELDUNGEN.Selected is empty then maybe this cause the issue?

    Try to use Update() function?

     

    Or :

     

     

    If(IsBlank(MELDUNGEN.Selected), // IsEmpty() for table
     Patch('IKS 2022', Defaults('IKS 2022'),
     {
     MELDUNGDURCH: User().FullName,
     MELDEDATUM: Now()
     }
     ),
     Patch('IKS 2022', MELDUNGEN.Selected,
     {
     MELDUNGDURCH: User().FullName,
     MELDEDATUM: Now()
     } 
     )
     )

     


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • scuderia Profile Picture
    18 on at

    Hi victorcp

    MELDUNGEN is a data table containing informations (columns: Quarter, Project, Name & Date/Time) from the datasource in Sharepoint and yes, the data needs to be selected by the user and will be shown before the patch. 

  • scuderia Profile Picture
    18 on at

    Gochix

    The button (with the patch function) is not visible without any selection, this will be achieved with"DisplayMode":

     

    If(Or('Auswahl_KST|KTR'.Selected.Result = Blank();Auswahl_QUARTAL.Selected.Result=Blank());DisplayMode.Disabled;DisplayMode.Edit)

  • Gochix Profile Picture
    1,937 Moderator on at

    Have you tried to use Update() instead of patch? If all you need is to update the record.


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • scuderia Profile Picture
    18 on at

    It took me a while, but I've updated the code as follows:

     

    Concurrent(
    UpdateContext(
    Patch(
    'IKS 2022 TEST';
    MELDUNGEN.Selected;
    {MELDUNGDURCH: User().FullName};
    {MELDEDATUM: Now()}
    )
    );
    Reset('Auswahl_KST|KTR');
    Reset(Auswahl_QUARTAL);
    Notify(
    "Daten werden gespeichert, bitte warten!";
    NotificationType.Success;
    1300
    )
    )

     

    ...and the Problem still exists. Further help is needed...

  • scuderia Profile Picture
    18 on at

    Who can help me with this issue?

  • scuderia Profile Picture
    18 on at

    please note that the "delayed load" option is disabled but the problem still occurs

  • victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    I think the best way to understand what is happening is using the monitor and track what is going on in your app.

    To open the monitor click on tools and select open monitor:

    victorcp_1-1663577704637.png

    All actions will appear in a table and you can track what is happening

    victorcp_2-1663577769598.png

    If you have any doubts please take a screenshot of the monitor after the first patch and we can have a look

     

    I hope it helps 🙂

  • scuderia Profile Picture
    18 on at

    @victorcp : good point, thank you.

    With the monitor it's obvious, that with with first patch (see line #58) nothing happens:

    scuderia_0-1663736272557.png

    #58 ends after 20 lines and the data won't be updated.

    On the other hand, with the secont attempt (see line #61) the data will be updated and the whole process is beeing documented within 158 lines:

     

    scuderia_1-1663736405825.png

    I'm looking for further help with this issue!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard