Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Error Handling
Suggested answer

White Screen at the start in Run mode but works perfectly in preview mode

(0) ShareShare
ReportReport
Posted on by 4
I am getting white screen after loading the App in Run Mode but app working fine in preview mode

Code is attached  below - 
 
Tree Screenshot - 
 
OnStart Code - 

Set(
    varPreloadDone,
    false
);
Refresh(EmployeeExitRequests);
ClearCollect(
    colMyExitRequests,
    Filter(
        EmployeeExitRequests,
        EmployeeName.Email = User().Email
    )
);
Set(
    varActiveTab,
    "Employee"
);
// Set selected item from deep link (used in Admin/Teams scenarios)
If(
    !IsBlank(Param("ID")),
    Set(
        varThisItem,
        LookUp(
            EmployeeExitRequests,
            ID = Value(Param("ID"))
        )
    )
);
// Set form mode based on role/deeplink
Switch(
    Param("screenname"),
    "Submitter",
    Set(
        varFormMode,
        FormMode.View
    ),
    "adminReview",
    Set(
        varFormMode,
        FormMode.Edit
    ),
    "",// If no screenname param, handle logged-in employee
    If(
        !IsBlank(varThisItem.RequestStatus.Value),
        Set(
            varFormMode,
            FormMode.View
        ),
        Set(
            varFormMode,
            FormMode.Edit
        )
    ),
    // Fallback
    Set(
        varFormMode,
        FormMode.Edit
    )
);
// Fallback if no ID is passed
If(
    IsBlank(varThisItem),
    Set(
        varThisItem,
        First(EmployeeExitRequests)
    )
);
// Set Tabs
If(
    Param("screenname") = "Submitter",
    ClearCollect(
        colTab,
        {
            Name: "Employee Details",
            Order: 1
        }
    ),
    ClearCollect(
        colTab,
        [
            {
                Name: "Employee Details",
                Order: 1
            },
            {
                Name: "Manager",
                Order: 2
            },
            {
                Name: "Finance",
                Order: 3
            },
            {
                Name: "HSEQ",
                Order: 4
            },
            {
                Name: "IT",
                Order: 5
            },
            {
                Name: "Technical Service",
                Order: 6
            },
            {
                Name: "Final HR",
                Order: 7
            },
            {
                Name: "Status",
                Order: 8
            }
        ]
    )
);
// ✅ Mark loading complete (timer handles navigation)
Set(
    varPreloadDone,
    true
);
 
  • ronaldwalcott Profile Picture
    3,810 on at
    White Screen at the start in Run mode but works perfectly in preview mode
    Have you tried using Monitor to ensure that the variables are being set and that Navigate isn't failing due to not receiving a valid value?
  • PT-26050453-0 Profile Picture
    4 on at
    White Screen at the start in Run mode but works perfectly in preview mode
     
    @MS.Ragavendar
     
    I'm using Refresh() and ClearCollect() in OnStart to load only the logged-in user's data into colMyExitRequests, which is used for filtering and performance. - Removed it currently
     

    The Timer is needed because Power Apps blocks Navigate() calls inside OnStart when you set a StartScreen. So I use a loading screen + timer to safely move to the form screen after all variables are set. - 

  • Suggested answer
    MS.Ragavendar Profile Picture
    2,210 on at
    White Screen at the start in Run mode but works perfectly in preview mode
     
    You  refreshing the datasource and creating the collection in the app on start?
     
    What is the purpose of It & how much volume of records does it holds?
     
    Refresh(EmployeeExitRequests);
    ClearCollect(
        colMyExitRequests,
        Filter(
            EmployeeExitRequests,
            EmployeeName.Email = User().Email
        )
    );
     
    Why there is need of timer control, since you created the app on start it will execute sequentially and no need of timer controls accordingly.
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • Suggested answer
    PT-26050453-0 Profile Picture
    4 on at
    White Screen at the start in Run mode but works perfectly in preview mode
    Updated my Query
  • mmbr1606 Profile Picture
    12,652 Super User 2025 Season 1 on at
    White Screen at the start in Run mode but works perfectly in preview mode
    hello

    without any more details we will not be able to help. did you save/publish? dou you have a long code in app onstart?
     
     
    please explain more and share screenshots of your app.
     
     
     
    cheers

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics