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 / "No Items to display" ...
Power Apps
Answered

"No Items to display" in edit form after patch, need to allow user to view items after patch

(0) ShareShare
ReportReport
Posted on by 179

I'm building a powerapp where a person can add files on a sharepoint record. It's a very complex powerapp that does several things, but I need this one screen to allow a user to add attachments and press a button to add the file to their sharepoint record and allow them to add more files at a later date.

The way it is now, is that it'll work for the very first time the person goes to add files after the record is made, then after a successful patch, it'll say "no items to display" even though there are items to display. I can verify this by going to the SharePoint record and it'll have the uploaded files. I believe what may be going on is that the patch function is unselecting the item, but I can't figure out to make it stop doing this.

On select property of the button

Patch(
'sharepointlist',
LookUp('sharepointtable',MilestoneID=varPropAttempt.MilestoneID),
{
Attachments: DataCardValue75_2
},
Updated_Proposal_Attachments_2.Updates
);
{
'Start date': DatePicker1_4.SelectedDate + Time(Value(HourValue1_9.Selected.Value), Value(MinuteValue1_9.Selected.Value), 0),
Location: TextInput2_4.Text
}
);

The edit form item field is 

LookUp('sharepointlist',MilestoneID=varPropAttempt.MilestoneID)

It should go to something like 244 then go to sharepointlist, go to column with "MilestoneID" and then show all files for the record.

I tried to do Set(IDSelected,varPropAttempt.Attachments); on my button as the first step, and then have the "item" field of the edit form to "(IDSelected), but it'll say "no items to display" after the user clicks the button.

Any times/advice?

The root question is : I have a button that patches an "edit" gallery, I need to make it so that the items are listed after the person pressed the button.

Categories:
  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    For your Edit form, what happens if you change the Items property from "IDSelected" to something like

    LookUp(YourDataSource, ID = IDSelected)

     Replacing the data source and look up column with the correct ones

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @WBADAM03 ,

    I am a little confused if you say this works - you cannot Patch attachments like that - you need an Attachment control and either submit the form or Patch(FormName.Updates).

  • WBADAM03 Profile Picture
    179 on at

    I don't think I am explaining this very well. I am not very good at powerapps and this is a project that I'm working on that I didn't create, so I might be misunderstanding how it functions.

    What I should see is what the user sees before they add additional files. They can add files and hit the "save" button and it patches to sharepoint correctly. I can view the files uploaded.

    The problem is that once the patch goes through, it says "no items to display" and they can't add anything.

    The structure will be attached too.

    It does do a Patch and then points to a formName.updates in this case, it's 

    Patch(
    'sharepointlist,
    LookUp('sharepointlist',MilestoneID=varPropAttempt.MilestoneID),
    {
    Attachments: DataCardValue75_2
    },
    Updated_Proposal_Attachments_2.Updates
    );

    DataCardValue75_2 seems to be an attachment datacard and then "Updated_Proposal_Attachments_2" is an "edit form" object with an item field of "LookUp('sharepointsite',MilestoneID=varPropAttempt.MilestoneID)"

    Does this make sense/help ? Basically, this works perfectly, once, then it won't let the user add anything else afterwards.

    WhatI should see.png
    screenlayout.PNG
    problem.png
  • WBADAM03 Profile Picture
    179 on at

    Beyond a delegation warning, it functions seemingly the same way with the same problem.

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    @WBADAM03 ,

    @Rusk responded just before me, so I will leave you there - I will again however note that you cannot patch attachments like that.

  • WBADAM03 Profile Picture
    179 on at

    I am more confused than before:

    You say I need to patch it with Patch(FormName.Updates), but I say that I am doing that with ....patch(...Updated_Proposal_Attachments_2.Updates).

    How is this not what you are saying? I mean no offense, I am legit confused by what I am doing differently than what you are saying. It is patching attachments, my problem is that it only works once, then it goes to "no items to display" like it "forgets" the particular record to lookup.

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @WBADAM03 ,

    I must admit I read the top line

    {
    Attachments: DataCardValue75_2
    },

    which simply does not work and needs to be removed - I overlooked

    Updated_Proposal_Attachments_2.Updates

    which will work (as you have noted).

  • Verified answer
    WBADAM03 Profile Picture
    179 on at

    I solved it.

    When I was debugging my sharepoint list, i had changed the milestoneID column on a record. After feeling silly, I realized it was looking for a record with an ID of 726, which is not possible on this other table as it only has up to 234. When I changed this to 234, it worked. In summary, the code was working, it was just looking for a record that didn't exist.


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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard