Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AntonioM
Solution Sage
Solution Sage

Sharepoint.Contents functions disable change source?

Hello, 

 

I've imported data from a Sharepoint site in a number of queries using Sharepoint.Contents, and now I can't use either the 'Change Source' button in Data source settings or the cog next to the source step. 

 

I've found that changing these to use Sharepoint.Files brings back these features. Is there a reason for this? The Source steps are identical aside from the function.

 

 

 

= SharePoint.Files("https://nhs.sharepoint.com/sites/msteams_123456789/", [ApiVersion = 15])
= SharePoint.Contents("https://nhs.sharepoint.com/sites/msteams_123456789/", [ApiVersion = 15])

 

 

 

I figure I could have instead used a parameter for all of these (which would now be easier to change) but I don't see why Change Source won't just edit the URL in each query.

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @AntonioM 

 

I can reproduce what you have described. I feel that in Applied Steps pane, if a step is added with the User Interface or it is a simple step which can be achieved by the User Interface, it will have a gear icon aside for users to edit it. However, once you edit a step's M code to make it more complicated, this may make it not able to be edited by User Interface thus the gear icon will disappear. 

 

When you use Sharepoint.Files(), it finds that you can use the built-in Sharepoint Folder connector to connect to the data source, so it displays the "Sharepoint folder" window for you to configure the URL. When you use Sharepoint.Contents(), it cannot find an appropriate built-in connector User Interface for configure, as a result you can only modify the M code directly. 

 

In your scenario, using a parameter will be simpler. It can be used in multiple queries and only needs to be modified at one place. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @AntonioM 

 

I can reproduce what you have described. I feel that in Applied Steps pane, if a step is added with the User Interface or it is a simple step which can be achieved by the User Interface, it will have a gear icon aside for users to edit it. However, once you edit a step's M code to make it more complicated, this may make it not able to be edited by User Interface thus the gear icon will disappear. 

 

When you use Sharepoint.Files(), it finds that you can use the built-in Sharepoint Folder connector to connect to the data source, so it displays the "Sharepoint folder" window for you to configure the URL. When you use Sharepoint.Contents(), it cannot find an appropriate built-in connector User Interface for configure, as a result you can only modify the M code directly. 

 

In your scenario, using a parameter will be simpler. It can be used in multiple queries and only needs to be modified at one place. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi, @v-jingzhang 

 

That makes sense, thanks. I have switched over to a parameter which does work simpler here.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.