cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

PowerApps Custom SharePoint List Form only Displays First List Item Data

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.

 

17 REPLIES 17

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))

View solution in original post

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.

Great! 

 

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.

Hi @Runner55552 

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.

Step:6

Come back to SharePoint and carry out the steps given below:

  1. In the source environment, save List as a template (*.stp)
  2. Upload the stp file to target Site (_catalogs/lt/Forms/AllItems.aspx)
  3. Important: create a List in the target environment with the same internal name as it was in the source. (to make sure we are getting the replica of the List)
  4. Go to https://web.powerapps.com  & Login using the target Tenant credentials.
  5. Go to Apps section and click on “Import-Package (preview)” as shown in the below image

 

https://www.microland.com/blogs/powerapps-customizations

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,521)