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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint Power Apps ...
Power Apps
Unanswered

SharePoint Power Apps form loading same item for all entries in the list

(0) ShareShare
ReportReport
Posted on by 44

I have a custom form I use for a list our team uses. We have been using it with no issues for the last several years, but today we are having issues where the same item is loading in the form regardless of which item we select in the list.

 

Is there a way to fix this? The Items code was not changed at all in the form, so I am not sure what might be causing the issue.

Categories:
I have the same question (0)
  • subsguts Profile Picture
    1,259 Moderator on at

    I think more details are needed to solve your problem.

     

    I would suggest providing the code for your Items property.

     

    In addition, if this code has truly gone unchanged, then the cause is usually the data source has changed.  So the second request is how is the data source populated it?   Have you examined the data source to see if it has duplicates in it?

     

    Any other details, etc. you can provide will help get you a correct solution more quickly.

     

    Hope this helps.

     

  • AndyJJones Profile Picture
    44 on at

    Sorry about that ... Here is the current code for the Item in our SharePoint1 Form:

     

    If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),Last('ISR Tracking'),SharePointIntegration.Selected)

     

    The DataSource is also unchanged so far as I can tell. It is just a string:  'ISR Tracking'

     

    Also, I tried reverting to an earlier version of the form and it seems to be broken in earlier versions as well ... but I will continue testing that...

    Revert to earlier version > Clear Cookies > Refresh the list > test

  • subsguts Profile Picture
    1,259 Moderator on at

    The Last function:

    • PowerApps Last is a function that will return the last item or record of a data source or a table.

    Therefore in your code, it will pull the Last item or record in the data source 'ISR Tracking'.

     

    So, are you expecting that code to be executed, if so, what does the 'ISR Tracking' SP List look like?

     

    If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),Last('ISR Tracking'),SharePointIntegration.Selected)

     

    On the other hand, are you expecting SharePointIntegration.Selected to not be blank or empty?  

     

    FYI, not sure why you need the IsEmpty?  Since I believe based on the following it is redundant and isBlank should be sufficient to cover all your bases:

    The isEmpty operator checks if a string contains no characters and is only whitespace. The isBlank operator checks if a string contains no characters, is only whitespace, and is null.

     

    Providing this information to hopefully help lead you to a solution.  However, please provide additional details like the 'ISR Trakcing" SP List, etc. and will see what we can figure out.

     

    Hope this helps.

     

  • AndyJJones Profile Picture
    44 on at

    The ISR Tracking list is a list with all sorts of columns, TrackingID, Assesssment Type, Title, Status, Requester, Assignee, Notes  ... 

     

    When I change the Item formula to be just SharePointIntegration.Selected, the form does not load ... it just sits there stating that it is "Loading Data ... "

     

    One thing I noticed ... both the SharePointIntegration DataSource and the SharePointForm1 DataSource are the same:  'ISR Tracking'

  • subsguts Profile Picture
    1,259 Moderator on at

    I can only theorize on this, but I think:

     

    IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected)

     

    must be returning true and it is executing the Last('ISR Tracking')

     

    I say this because you indicate you are always getting back the same value regardless of what you select and this would explain why that is the case.

     

    Therefore I would try throwing a label on the screen and put the SharePointIntegration.Selected in it to see what that is returning.  BTW, what type of control is SharePointIntegration?

     

    Knowing the type of control you are using may be helpful as well in solving the problem.

     

    Thanks.  Hope this helps.

     

  • AndyJJones Profile Picture
    44 on at

    I have attached a screenshot of the Tree view showing SharePointIntegration and SharePointForm1

     

    I tried adding a control to display the value of the SharePointIntegration.Selected, but that returns a Record type, so I can't just display that ... I'd have to do SharePointIntegration.Selected.<FIELDNAME>. I can display SharePointIntegration.SelectedListItemID, but that just returns the item.

    ISRSharepointForm1.png
  • subsguts Profile Picture
    1,259 Moderator on at

    What is SharepointIntegration?  Is it a Sharepoint List?

     

    Sorry for so many questions, but it's difficult to tell exactly what the code is doing and how the If statement works if you can't display the values it is evaluating.

     

    Maybe try putting into labels each part of the if statement, so in one label put:

    IsBlank(SharePointIntegration.Selected)

    And in the other put:
    IsEmpty(SharePointIntegration.Selected)

     

    And see if these are coming back as true or false.

     

    Thanks, we'll get there, eventually 🙂

  • AndyJJones Profile Picture
    44 on at

    I believe SharePointIntegration is a list. It is a default object that is created when you choose to customize the form from a SP List using PowerApps.

     

    When I examine these values, here is the result:

    IsBlank(SharePointIntegration.Selected) = true
    IsEmpty(SharePointIntegration.Selected) = false

  • AndyJJones Profile Picture
    44 on at

    I have found that if I specify the exact ID of an item, it loads fine, but if I use the SharePointIntegration.SelectedListItemID value, it does not:

     

    First(Filter('ISR Tracking',ID=SharePointIntegration.SelectedListItemID))

    vs
    First(Filter('ISR Tracking',ID=1508))

     

    Screenshot results attached...

    ISRSharepointForm2.png
    ISRSharepointForm3.png
  • subsguts Profile Picture
    1,259 Moderator on at

    Only one of your conditions need to be true, and in this case you are getting a true and a false, therefore, the first action will always be executed:

     

    If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),Last('ISR Tracking'),SharePointIntegration.Selected)

     

    The first action being: Last('ISR Tracking')

    So it will never executed the SharePointIntegration.Selected, which is what I think you wanted.  So maybe just use the "IsEmpty" and eliminate the "IsBlank".  "Is Empty" works on datasets and I believe that is what "SharePointIntegration.Selected" is. 

    Hope this helps.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard