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 / Offline Collection onl...
Power Apps
Answered

Offline Collection only keeping one entry

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi My app is only sending one entry when offline back to Sharepoint when reconnected, is it my code?

 

(There is a timer set to check for connection and send to sharepoint) its OnTimerEnd is 

 

If(Connection.Connected, Patch('Haulage Operators Log', Defaults('Haulage Operators Log'),
{Haul_x0020_Truck: Can_haul.Selected,
Activity: Can_Activity.Selected,
to: Can_to.Selected,
From: Can_From.Selected,
Pit: Can_Pit.Selected,
starthours: Value(Can_Starthours.Text),
finishhours: Value(Can_Finishhours.Text)}); Clear(RD18COLLECTION))

 

 

See the submit button below

 

If(Connection.Connected
,Patch('Haulage Operators Log',
Defaults('Haulage Operators Log'),
{
to: Can_to.Selected,
From: Can_From.Selected,
Pit: Can_Pit.Selected,
Activity:Can_Activity.Selected,
Haul_x0020_Truck: Can_haul.Selected,
starthours: Can_Starthours.Text,
finishhours: Can_Finishhours.Text
}
)
,Collect(RD18COLLECTION,
{
to: Can_to.Selected,
From: Can_From.Selected,
Pit: Can_Pit.Selected,
Activity:Can_Activity.Selected,
Haul_x0020_Truck: Can_haul.Selected,
starthours: Can_Starthours.Text,
finishhours: Can_Finishhours.Text
}
)
);
UpdateContext({ResetVar: true});
UpdateContext({ResetVar:false});
Navigate(DetailScreen1, ScreenTransition.None)

Categories:
  • Verified answer
    SoPatt Profile Picture
    Microsoft Employee on at

    When your timer event happens, you are taking the contents of the controls on the form and writing that as a single record to the 'Haulage Operators Log'. I think what you want on your timer event is to write each record from RD18COLLECTION back to 'Haulage Operators Log'.

    If(Connection.Connected,
        ForAll(RD18COLLECTION,
            Patch('Haulage Operators Log',
                Defaults('Haulage Operators'),
                {
                    to: to,
                    From: From,
                    Pit: Pit,
                    Activity: Activity,
                    Haul_x0020_Truck: Haul_x0020_Truck,
                    starthours: starthours,
                    finishhours: finishhours

               }

            )

        );
        Clear(RD18COLLECTION)
    )

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard