cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ebaron
Advocate I
Advocate I

DataSourceInfo() Does Not Work properly

Hi,

I'm trying to use DataSourceInfo to test if a user can delete an item in a list:

 

text property of a label control
If(DataSourceInfo(MyTestList,DataSourceInfo.DeletePermission) = true, "You can delete an item in the current list"),"Ok you don't have delete permission");

And I've tested with CreatePermission, EditPermission. It always return true.
To be sure, I've check the permission of the user for that list from the list permission, and he doesn't have delete permission, neither create or edit.

 

What's wrong with the formula above?

Tks

7 REPLIES 7
v-xida-msft
Community Support
Community Support

Hi @ebaron ,

Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side.

 

I would post this issue to my product team, if the issue is solved, I would reply here.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi 

thanks for your test.

Any news from the product team ?

 

 

Hi @ebaron ,

Just an update -- 

I’ve seen this incident in the past and has surfaced on the forums a few times. All I know is that DataSourceInfo is not supported (at least for Sharepoint)

Currently, the DataSourceInfo() function is not supported in SharePoint List. The Product Team is investigating this issue, and plan to add support for this function.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the feedback!

Hi,

 

I've seen a few posts about his function and their use with Sharepoint. It was working before, no?? So do you have any update from the product team?

Stefan_J
Advocate I
Advocate I

Any update? I need this function.

robertb
New Member

Workaround hack for the DataSourceInfo-always-true bug.

1. Create a new Sharepoint list with 1 row

2. Grant read permission only to the group you want to test

3. Add a hidden Gallery control to your PowerApp that refers to your new list

4. The Gallery will only load rows if the user has that permission, so use CountRows to test this.

 

Robert.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,923)