Skip to main content

Notifications

Power Apps - Power Query
Suggested answer

SharePoint Integration custom form caching issue

(0) ShareShare
ReportReport
Posted on by
I have a SharePoint list with over 70 columns and two roles defined on the site: Submitter and Approver. To simplify, I split the columns into two separate forms displayed on different screens based on roles. In the SharePoint integration’s onEdit property, I’ve implemented logic to determine which form should be in edit mode based on the status field, and it navigates to the corresponding screen.
However, I’m encountering a caching issue. On the first edit attempt, the function in the onEdit property does not execute as expected and redirects to the last opened screen instead but form data is appropriate. On the second edit attempt of the same item, the code runs correctly, and it navigates to the proper screen.
Is there any resolution for this issue?

OnEdit of sharepoint integration implemented formula:
If(SharePointIntegration.Selected.Stage.Value="First",EditForm(FormFirst);Navigate(screenFirstForm),EditForm(FormSecond);Navigate(screenSecondForm)
Categories:
  • Suggested answer
    SaiRT14 Profile Picture
    SaiRT14 1,474 on at
    SharePoint Integration custom form caching issue
     
    The behavior you're encountering in Power Apps is likely due to caching or timing issues in the SharePointIntegration context when determining which screen to navigate to during the first edit attempt. 
     
    Force a Refresh on the SharePointIntegration Context 
    Refresh('YourSharePointList'); // Replace with your actual list name
    If(
        SharePointIntegration.Selected.Stage.Value = "First",
        EditForm(FormFirst);
        Navigate(screenFirstForm),
        EditForm(FormSecond);
        Navigate(screenSecondForm)
    )
     
    Use a Timer for Delayed Execution
    Modify the OnEdit formula to start the timer - Set(NavigateToForm, SharePointIntegration.Selected.Stage.Value);
    Timer1.Start();
     
    OnTimerEnd property, add the navigation logic - If(
        NavigateToForm = "First",
        EditForm(FormFirst);
        Navigate(screenFirstForm),
        EditForm(FormSecond);
        Navigate(screenSecondForm)
    );
     
    In the OnStart property of the app, Set(Preload, false);
    Navigate(screenFirstForm);
    Navigate(screenSecondForm);
    Navigate(DefaultScreen); // Replace with your default screen
     
     
    Pls try and let me know if you have issues.
     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard

Featured topics