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 Apps
Answered

Patch OnTimerEnd

(0) ShareShare
ReportReport
Posted on by 149

Hello,

 

I wannabe able to Patch some basic text into my Dataverse table, however, nothing really on the property OnTimerEnd

This is what I have done:

Set(
 varStartSampleNow,
 Patch(
 'Test Data',
 LookUp(
 'Test Data',
 varStartSampleNow.'Test Data' = 'Test Data'
 ),
 {Notification_2: "X"}
 )
);

 

Categories:
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @Rama96x ,

    What are you trying to do here - your criteria is when the field equals a value in the variable that is not set yet (it is the end result of the code)

    LookUp(
     'Test Data',
     varStartSampleNow.'Test Data' = 'Test Data'
    ),

     

  • Rama96x Profile Picture
    149 on at

    @WarrenBelz sorry, I should have explained this part
    I have a "Start timer" button, where I am basically patching start time, user email and setting the Timer as active.
    This is stored in a global variable called varStartSampleNow

     

    What I'm then trying to do now is having a second timer that counts down with -30 minutes in relation to the main timer. When this timer has then ended I want to patch to this specific record which I'm targeting through an ID (called 'Test Data'). 

    Basically, LookUp an existing record and patch to column name 'Notification_2'

     

    Hope it makes sense!

    Set(
     varStartSampleNow,
     Patch(
     'Test Data',
     Defaults('Test Data'),
     {
     'Taken By': User().Email,
     'Timer Active': true,
     'Timer Start':Today() + Time(Value(txtDDHour.Text),Value(txtDDMinute.Text),0)
     }
     )
    )
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @Rama96x ,

    Still a bit lost - your initial post Lookup has it looking at itself, so all records will equal.

  • Rama96x Profile Picture
    149 on at

    I tried to add this bit of code on a button on its OnSelect property, and this works as intended (it patches to a specific ID), so I don't agree that it equals all records

     

    Patch(
     'Test Data',
     LookUp(
     'Test Datas',
     varStartSampleNow.'Test Data' = 'Test Data'
     ),
     {Notification_1: "TEST"}
    );

     

     

    I also tested this on a different timer where I'm basically just patching a new record (Defaults), and this works fine on the OnTimerEnd property on a timer. I think the issue is that the timer that is supposed to act as a notification is counting down and not up, so perhaps it doesn't understand when the timer actually ends?

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @Rama96x ,

    I do not use Table Variables (that is what collections are for), but I see it now if 'Test Data' is unique. So you are saying this does not change the required record ? 

  • Verified answer
    Rama96x Profile Picture
    149 on at

    @WarrenBelz 
    Yes it is unique! 🙂 
    I managed to make it work.

    The reason why it didn't work was because it didn't "understand" when the timer ends. The reason was that the 'main timer' acted as a stopper for the other timer, so it would only patch when the main timer actually ended... 

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 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard