cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zarski
Advocate II
Advocate II

SharePoint customized form default item issue

Hello,

 

when you customize SharePoint forms with Power Apps, there's a little (or sometimes quite big) problem with the OOB code in SharePointForm1 Item property. Currently there's default code to get the first item of the SharePoint list if no item is selected:

"If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First('YourListName'),SharePointIntegration.Selected)"

 

I know this is made for the work in the Studio (documentation here), but this creates a problem if user has a slow connection. For example, if you have an approval flow attached to the item/form, approver clicks the hyperlink from the email to open the form and if he or she has a slow connection, it will show momentarily (maybe a second or two) the first list item's data and then it will load the correct item's data.

 

You can test this with browser's developer tools by setting throttling to Slow 3G.

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @zarski ,

 

I think you can directly set the value of the variable on the onedit/onnew... attribute.

You could decide whether to display the default item according to the value of this variable.

You don't need to wait for the result of SharePointIntegration.Selected.

 

Best Regards,

Wearsky

Thanks, sure we can do that. I just wanted to point out that the default "out-of-the-box" code for the sharepointform's item attribute is not very good for slow connections and SharePointeIntegrations.Selected should be enough...

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,292)