cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Runner55552
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.

 

18 REPLIES 18

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.

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

ojonah
Frequent Visitor

That worked for me, thanks. I have been working on this for days.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,270)