web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

My custom form does not load data the first time

(0) ShareShare
ReportReport
Posted on by 2
Hello Team, My custom form does not load data the first time and i have tried everything chatGTP provided but still can't figure it out. when i select a particular record and click on edit in sharepointlist, it opens the form with no data and when i close it and click on edit again, it then populated the form with data, anyone with a solution?
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    149,319 Most Valuable Professional on at
    My custom form does not load data the first time
     
    SharePoint Integrated apps are not designed to detect incoming parameters (Canvas apps do this and what URL are you using). The easiest way to open a record with the integrated form is use the 'Link to item' property of the record, which is a URL and will open the form much more efficiently.
     
    Also when the an action is taken on a record (for the fist time), all built-in actions (App OnStart, Screen OnVisible) run as expected. When you have finished the action, (you will see this in the code) a RequestHide action is iplemented, simply "hiding" the form - it is still open in the background exactly where you left it. When the user selects a new record, the only variable that is updated is SharePointIntegrated.Selected - no other actions including the ones above run, meaning that any variables remain exactly as they were for the last record. This is done for performance reasons and normally, updating SharePointIntegrated.Selected is sufficient to do the job.
     
    I am not sure whether this is your actual problem, but setting variables based on opening a record (now you have provided your code), is not a good idea and will have many instances that it will not work (as noted above).
  • Suggested answer
    DN-12080305-0 Profile Picture
    2 on at
    My custom form does not load data the first time
    Thanks for you feedback; i Alread have my set() on my custom form OnVisible option as seen
    Refresh('Tenant Status Change');
    // Detect if editing via SharePoint
    If(
        !IsBlank(SharePointIntegration.Selected.ID),
        // Edit mode
        Set(varIsEditMode, true);
        Set(varSelectedID, SharePointIntegration.Selected.ID);
        Set(varSelectedRecord, LookUp('Tenant Status Change', ID = varSelectedID))
    ,
        // New form or custom load
        If(
            !IsBlank(Param("ID")),
            Set(varIsEditMode, false);
            Set(varSelectedID, Value(Param("ID")));
            Set(varSelectedRecord, LookUp('Tenant Status Change', ID = varSelectedID))
        )
    );
     
  • Suggested answer
    Gabriel G. Profile Picture
    761 Super User 2025 Season 2 on at
    My custom form does not load data the first time
    Hi,

    I feel like your PowerFX needs fix on refreshing your variables. make sure you set your variables properly before reach your form. Also, make sure you use Set() (not UpdateContext() if your form is in another screen. Otherwise, variables will be cleared before you load the form.

    Another point is, make sure your form is in EditMode.

    I hope it helps!
    _____________________________________________________________
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
  • Suggested answer
    StretchFredrik Profile Picture
    3,134 Super User 2025 Season 2 on at
    My custom form does not load data the first time
    Hello,
     
    you can try to set the item "Manually" 
     
    Set(selectedItem, ThisItem);
    EditForm(Form1);
    Navigate(EditScreen);
    
    Then bind the selectedItem to the Form via the Item property.
     
    If my response solved your issue, please mark it as ✅ Accepted Answer and give it a like.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473