I have a PowerApps form integrated with a SharePoint list. It has two forms, one of which allows entry of a new item (works fine), and the other form allows editing of the selected item. In edit mode, no matter what item the user intially selects from the list, the fields in the form are filled in with the "First" list item. I think this is happening because of the if statement in the form properties:
If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First(DailyPhoneLog_Query),SharePointIntegration.Selected)
It appears that even though an item is selected, the form is interpreting the item or its ID as blank, and thus reverts to the First list item to display in the data cards/fields.
I have another list where I originally created this app from, where it works perfectly. I used the export package feature, then imported the app package into this list, then modified the data sources, etc.
Any help or insight would be appreciated.
Solved! Go to Solution.
Actually, just read your note a little closer. By delete datasource, do you mean remove the datasource connection from the PowerApp (not delete the actual datasource)? Would I need to delete the datasource from the entire app, or just from the screen and form that is not working? the add new item works fine, so I am hesitant to do something that would stop that from working.
I think the fix you found is your best bet. That user reports success!
When you delete the datasource, it deletes it from the app, but it is easy enough to add back in. However, I am sure the user who posted the fix would have tried that.
I have found a quick way to get the correct item to show, I think, but again... I think correcting the root cause is always a better idea than attempting workarounds like this. For info, I will post it anyway:
Set the Item formula of the edit form to:
First(Filter('My Data Source', ID = SharePointIntegration.SelectedListItemID))
Could you by any chance, share a link to instructions on exporting a PowerApp from 1 site & importing it into another? I could really use something like that.
Thanks, this worked! I have taken the other users's suggestion also, as that gets at the root cause, and I already have the modified app package zipped and ready to import. If your workaound keeps working, though, I'm going to leave your solution in place for now.
I'm glad I could help 🙂
Any chance on this request?
Could you by any chance, share a link to instructions on exporting a PowerApp from 1 ShaerPoint site & importing it into another? I could really use something like that.
I was having the exact same issue as you. Where did you import the package after updating the JSON file? I only see an Export option under Versions.
See this user's explanation here. Step 6 explains how to do the import. You have to log into web.powerapps.com first, then you should be able to find the import option.
Come back to SharePoint and carry out the steps given below:
Check out the News & Announcements to learn more.
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.