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 / Update a today record ...
Power Apps
Answered

Update a today record in a list

(0) ShareShare
ReportReport
Posted on by 599

Hi ,

In my app i need to store a login and logout time in a List.

 

Following is my list,

NameDepartmentLoginLogout
SureshJava5/12/2021 10:02 AM5/13/2021 11:30 AM
SureshJava5/13/2021 11:00 AM 

 

In my app i have a two buttons. one for login and other for logout.

 

Login formula is,

Patch('List',Last(Sort('List',Name,Descending)),{Logout:Now()});

 

Now i need to update a logout time in a last row of a list.

i need to store a login and logout daily details in a list

How to update a logout time in a existing last row of a list?

 

Thanks,

Dhinesh

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Dhinesh28R ,

     

    1\ Why is the logout value modified in your login formula?

    v-xiaochen-msft_0-1620890300839.png

     

    2\ When a user logs in (click on the login button ), do you want to create a new record and patch the current time to the login column?

    If so, you should create a record, not modify a record. 

    Your login formula is to modify a record.

     

    I assume that a user named 'Suresh' uses your 'login and logout' app.

    1\ Add a login button and set its onslect property to:

    Set(Thevar,Patch('List',Defaults('List'),{Name:User().FullName,Department:"Java",Login:Now()}))

    // When the user enters the app and presses the login button, a record/Item will be created, and the current time will be saved in the login column.

     

    2\ Add a logout button and set its onslect property to:

    Patch('List',Thevar,{Logout:Now()})

    // When the user presses the logout button before exiting the app, the current time will be saved in the logout column.

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Dhinesh28R Profile Picture
    599 on at

    Hi @v-xiaochen-msft ,

    Now its working fine man. 

    I wrongly typed login for Logout details man.

     

    Thanks,

    Dhinesh 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,033

#2
Valantis Profile Picture

Valantis 632

#3
11manish Profile Picture

11manish 607

Last 30 days Overall leaderboard