Hi. I have app in canvas with a simple data table. The data table is connected to a SPList. There is a drop down to select employee that the data table filters on. I have gone into the List and deleted test rows and the refreshed the datasource in the app. But the deleted lines still appear in the data table. Why?
I've just deleted it and created a new List. now its working
recycle bin is empty. We all see the same thing. in the List there is 1 line
In the app there are more
I didn't use a gallery, its just a data table
Ok I see something similar if I open Microsoft Lists. I always work in SharePoint directly.
But I see something similar to your screen shot from Microsoft Lists.
If you go to the Recycle Bin in SharePoint, do you see your deleted items there? If another user goes into SharePoint, do the items that you deleted still show up in the List for them?
Since this is such a strange issue, we should start by verifying that items are getting deleted. Verify that the correct items are getting deleted using the ID column in the list to track the ID numbers that SharePoint uniquely assigns. Verify that those items are moved to the Recycle Bin.
In your Power App for your Gallery, add the ID Column if it is not already there. Maybe you have items in your SharePoint List that are named similarly and it makes it appear that deleted items are still there? ID is unique to each item in a List.
-Mark
The screen shoot is from the SharePoint List. As mentioned the issue seems to be that the List isn't refreshing and I don't know why.
Hi @Cosan
The screenshot you sent does not look familiar to me. Where did you take it from?
When I am editing a Power App, the url start with https://make.powerapps.com/ When you are editing your App, what does the url start with?
-Mark
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up.
Looks like there is something wrong with the List. Its not refreshing
Always has the refresh arrows, never the completed tick
What kind of field is Employee? People Picker? Text? Something else?
I tried to duplicate what you are seeing but I am not seeing the same thing. When i refresh the data source, the data table refreshes.
Is this App inside a Solution? I also tested this with "Can be used offline" turned on in Settings.
I created the following on a screen. (you can use "Paste" - "Paste code <Preview>" to add these to a screen)
- con_TestDataGridFilter:
Control: GroupContainer
Variant: manualLayoutContainer
Properties:
Height: =636
Width: =1112
X: =40
Y: =40
Children:
- btn_Refresh:
Control: Classic/Button
Properties:
OnSelect: =Refresh('Shared Timesheet data');
Text: ="Refresh"
X: =675
Y: =20
- dd_employee_R:
Control: Classic/DropDown
Properties:
Items: =["","Mark","Tom"]
X: =53
Y: =20
And the DataTable which I was surprised to see I can not add to a Container:
- dt_TimesheetData:
Control: DataTable
Variant: datatable
Properties:
Items: =If(IsBlankOrError(dd_employee_R.Selected.Value),'Shared Timesheet data',Filter('Shared Timesheet data',Employee=dd_employee_R.Selected.Value))
X: =85
Y: =125
Children:
- Employee_Column2:
Control: DataTableColumn
Variant: textualColumn
Properties:
FieldDisplayName: ="Employee"
Order: =3
Text: =ThisItem.Employee
- Title_Column2:
Control: DataTableColumn
Variant: textualColumn
Properties:
FieldDisplayName: ="Title"
Order: =2
Text: =ThisItem.Title
- ID_Column2:
Control: DataTableColumn
Variant: textualColumn
Properties:
FieldDisplayName: ="ID"
Order: =1
Text: =ThisItem.ID
Everything worked as expected.
Maybe exit the App and come back in?
-Mark
I used the Refresh from the left side menu. I added a refresh button as you said. That didn't work.
Hi @Cosan
When you say you refreshed the datasource, how did you do that? In Power Apps Studio, did you go to the left side menu and select "Refresh" for the SharePoint list? Or did you add a button with an OnSelect property set to:
Refresh('YourSharePointListGoesHERE');
What is the Items Property of your Data Table set to? Is it a Collection built off the SharePoint List? If so, you may need to re-initialize it.
-Mark
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up.
WarrenBelz
146,537
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,908
Most Valuable Professional