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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps Custom Share...
Power Apps
Unanswered

PowerApps Custom SharePoint List Form only Displays First List Item Data

(2) ShareShare
ReportReport
Posted on by 674

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.

 

Categories:
I have the same question (0)
  • AlisterT Profile Picture
    on at

    Your formula looks correct, have you checked the SharePointIntegration 'OnEdit' property to make sure it is doing what you expect it to? 

    For troubleshooting, you could add a label to your edit form and set it's text value to SharePointIntegration.SelectedListItemID just to see what ID, if any is being shown as selected, and also that the edit form being displayed is the one you expect....

  • 55552 Profile Picture
    674 on at

    yes, I just added a button to notify me of the SharePoint ID, and it looks like the SelectedID is correct, but the cards/data fields are reverting to a different ID (possibly 1).  Shows the same one every time. Screenshot from one of the cards, which should pick up the current Item value for that specific column in SharePoint (see screenshot). the odd thing is that I have a nearly identical list and powerapp that works.  I exported the app as a package, inserted it into this list, revised everything, and now it works except for picking up data from an existing record.

    PowerAppsCardInfo.png

  • AlisterT Profile Picture
    on at

    I'm pretty sure the default of each card shoud be 'Parent.Default'

  • AlisterT Profile Picture
    on at

    I'm pretty sure the default of each card shoud be 'Parent.Default'

  • 55552 Profile Picture
    674 on at

    Each data card has overall properties of the card, then individual properties of the label and value elements within the card. In my case, the data card overall property for default is ThisItem.<<datafieldname>> which tells the card which data field/column in the SharePoint list to attach to.  Then the "value" element of the card, which is the area where the result is displayed, is set to Parent.Default.

  • AlisterT Profile Picture
    on at

    It does seem like the form should be working.

    For testing, although it seems pointless, you could change the item formula for the edit form and remove the if statement, just write in SharePointIntegration.Selected.

    Also you could add a few labels and display some of the items field values using SharePointIntegration.Selected.CallerAddress etc. Just to see if your edit form can access the field values. 

    Maybe the import has messed up your edit form?

  • 55552 Profile Picture
    674 on at

    Thanks very much, good ideas. I gave both fo your suggestions a try.  

    1. Changing the formula to remove the If statement and just "SharePointIntegration.Selected" resulted in "Getting your data."  So it seems that the SharePointIntegration.Selected is returning blank or empty, even though we are selecting an item from a SharePoint list.

    2. Tried adding a label with a value of SharePointIntegration.Selected.CallerAddress, but that returned blank.

     

    I am suspecting there is something hidden in the code resulting from the original app export, and then import into a new list. In the error checking, I see these errors related to SharePoint Integration. I was hoping to avoid completely deleting this integrated form, and starting over, but I may have to start from scratch. I even tried inserting a new, blank screen, then a new form, and then tried adding one field, but still had the same issues.

    PowerApps_SP_Error.png

     

  • AlisterT Profile Picture
    on at

    Have you tried deleting the datasource?

     

    It might be worth a try. Delete the datasource, save the powerapp and then try re-adding it, that might give it a kick to re-create whatever .SelectedHidden property is...

  • 55552 Profile Picture
    674 on at

    I found this a possible solution by a user: https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/fix-an-error-in-SharePointIntegration-SelectedHidden-property/m-p/385290/highlight/false#M112057

     

    When I looked deep into the JSON files, I indeed found one reference to the list from which I exported the app originally, so I need to change that reference to the new list, then re-import the entire app package again.

  • 55552 Profile Picture
    674 on at

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard