Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

How do I hide spinner when a form populates?

Posted on 26 Nov 2024 15:06:42 by 739
When a user selects a gallery item it sometimes takes a little while for the form to populate. Even then, there are situations where the form updates only a small amount of data but it is not apparent that anything changed. What I am attempting to do is show a spinner when the gallery item is selected and hide that spinner when the form full populates. Here is what I have so far.
 
  1.  I set a context variable to true when a gallery item is selected - (UpdateContext({varShowRetrieveSpinner: true}).
  2. I set the spinner's Visible property too varShowRetrieveSpinner
  3.  ??? I need to set varShowRetrieveSpinner to false when the record loads into the form.
How do I do this?
Categories:
  • futr_vision Profile Picture
    futr_vision 739 on 26 Nov 2024 at 16:23:41
    How do I hide spinner when a form populates?
     
    I tried that with a field I knew would change when a new gallery item was selected. It happens to be one of the last fields. It didn't change the variable.
     
    That doesn't work. Selecting a gallery item is not the same as submitting a form where the OnSuccess or OnFailure would be triggered.
  • Suggested answer
    jpespena Profile Picture
    jpespena 150 on 26 Nov 2024 at 15:34:31
    How do I hide spinner when a form populates?
    Hi,
     
    Can you try putting the UpdateContext on the OnChange property of the last field of the form?
  • Suggested answer
    SaiRT14 Profile Picture
    SaiRT14 911 on 26 Nov 2024 at 15:34:11
    How do I hide spinner when a form populates?

    Pls try the following:
     
    Gallery OnSelect: UpdateContext({ varShowRetrieveSpinner: true });
     
    Spinner Visible: varShowRetrieveSpinner
     
    Form OnSuccess: UpdateContext({ varShowRetrieveSpinner: false });
     
    Form OnFailure:  
    UpdateContext({ varShowRetrieveSpinner: false });
    Notify("Failed to load the record.", NotificationType.Error);
     
    let me know if you need more details.  Thankz

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 #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,129

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,797

Leaderboard