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 / Autoupdate Sharepoint ...
Power Apps
Answered

Autoupdate Sharepoint list / Autorefresh Powerapp page with GPS

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have Lat/Long data on my Powerapp page which is want to continously send to Shareponit list after every 5 min.

 

I have made the logic and share point list but data is written in share point only 1 time and i need to refresh the page manually or go to another page and come back to this page.

 

OnVisible Property of Page:

Patch(Testpowerapp,
{
Title: Office365Users.MyProfile().DisplayName,
Lat: Lat.Text,
Long: Long.Text
}

)

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,246 Most Valuable Professional on at

    Not sure doing it every 5 minutes is a good idea, but to do something like this create a Flow with a recurrence trigger set to the time interval.  Then in the Flow update the listitem.  Otherwise you could just use a timer in the PowerApps page and set it to autostart and update the list using OnTimerEnd.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Pstork1 , Thanks for your reply.

    I have If conditions that if the loction is OUT or IN a given Lat/Long range then, it should update the Sharepoint list.

     

    Set(_flag1,Status.Text);

    If(_flag1<>_flag,

    Concurrent(Patch(Testpowerapp,
    {
    Title: Office365Users.MyProfile().DisplayName,
    DT: Now() + .0835,
    Status: Status.Text
    }

    ) , Set(_flag,_flag1) ) )

     

    Can a timer be used to check IN or OUT lable.text in the page?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    using OnTimerEnd

  • Pstork1 Profile Picture
    69,246 Most Valuable Professional on at

    Two things I see wrong here.

    1) Why are you using Concurrent()?  YOu only have one function so why do you need Concurrent?

    2) Your Patch statement won't work because you don't identify the record you want to update.  The syntax for Patch should be Patch(datasource, record to be updated in deatasource, updates).  You have Patch(datasource, updates)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 wrote:

    Two things I see wrong here.

    1) Why are you using Concurrent()?  YOu only have one function so why do you need Concurrent?

    ------ I am also updating the Flag

     

    2) Your Patch statement won't work because you don't identify the record you want to update.  The syntax for Patch should be Patch(datasource, record to be updated in deatasource, updates).  You have Patch(datasource, updates)

    ------ i want to create a new record everytime.


     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Let me know your thoughts - m new to Patch

  • Pstork1 Profile Picture
    69,246 Most Valuable Professional on at

    1) you don't need to update the Flag at the same time as the patch.  Doing it immediately after the patch should work exactly the same.

    2) If you want to create a new record you need to supply defaults(datasource) as the second parameter.  YOu use defaults for a new record and an existing record for an update.  YOu don't supply either.

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    1)Yes, Timer control's OnTimeEnd can be used to set variable.

     

    2)Your three actions are step by step. You do not need to use Concurrent function. Concurrent function is used to act two actions at the same time. Just use ";", which means that act actions in order.

     

    3)The right syntax of Patch should be:

    Patch(tablename, Defaults( tablename),{....})        //create a new item

    Patch(tablename,one spefic item, {....})               //modify an existing item, please replace one spefic item with the item that you want to modify

    Here's a doc about Patch for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

     

    To sum up, try this formula:

    Set(_flag1,Status.Text);
    If(_flag1<>_flag,
     Patch(Testpowerapp,Defaults(Testpowerapp),
     {
     Title: Office365Users.MyProfile().DisplayName,
     DT: Now() + .0835,
     Status: Status.Text
     }
     ) ;
    Set(_flag,_flag1)

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard