cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pdrampis
Level: Powered On

Office Template: Leave Request - Failed to read metadata from file source issue

Expected Behavior

Create a new working "Leave Request" powerapp using the available office template

 

Current Behavior
The new app seems to have a problem locating the excel file source to retrieve and save data. From the login page the app keeps throwing multiple errors all of the same type as the following:
The specified record was not found. Server Response: Failed to read metadata from file source. Response from the end service is : Not Found clientRequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Error In Run Screen

 

Possible Solution
Update the data source connection of the app?

 

Steps to Reproduce

  1. Open https://web.powerapps.com/ portal and select "Apps" on the left
  2. Create an app > Start with a blank canvas or a template > App templates > Tablet layout > Select the "Leave Request" template and click "Use"
  3. Follow the instructions in the following screens, like providing the required permissions to the app, until you are in the edit stage of the application
  4. File > Save as > The cloud (Save to PowerApps) > Give a name to your app
  5. Finally launch your application
  6. The applications opens the login screen throwing multiple error messages on the top of the page

 

Context (Environment)
All actions were made from a Windows 10 pc, using Microsoft Edge 40.15063.674.0

 

Detailed Description
The error seems to be the inability of locating the excel file that is used to read and write data. This can be seen not only while running the app, but also during the editing of the app.

Error In Edit Screen

 

The app has a connection to an excel file in my Onedrive for Bussiness. More specifically the following folder structure was created in my Onedrive automatically:
Documents > PowerApps > Templates > LeaveRequest_0c998dc8-7dac-f9b8-6041-05b72df2bf8d > data.xlsx
Something that may be of interest: After creating my app I can see it has App ID: 9a8df42d-1ef7-4228-b98e-111f7940b999. Which is totally different from the name of the folder holding the excel file. Could this be an issue? Maybe renaming the guid part of the folder to match my application's App ID could fix the problem? After a few tries it didn't seem to work.

 

Another interesting fact. In the edit screen after clicking on the error I get presented of another name of the excel file's tables. Like so:

Error Multiple Table Names

 

This happens for the Balance, Holidays and Leave tables of the excel file. Even though selecting the alternative names seems to take care the error in the edit screen, when running the app again I still receive errors. Could it be that the app is cached? I made sure saving and publishing the app, but the errors keep poping up.

 

I cannot find any documentation on how to alter the existing data source to make sure that the app can locate the excel file. From the screens "CompanyHolidaysScreen" and "LeaveBalanceScreen" you can go and change the data source of the collections but this is not the best solution since one would have to locate all the data connections in all the screens of the app and manually change it. That kinda beats the whole purpose of creating an application from a predefined template.

I have spent the whole day reading the functions inside the screens and I have a good grasp of what each screen does and how it does it, but I have still not been able to load or write data to the app. Please provide us with a solid documentation that explains on how to update the data connections of the app or how to solve the "Failed to read metadata from file source issue"

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Office Template: Leave Request - Failed to read metadata from file source issue

Hi @pdrampis

 

Sure, let me try to give more details about the steps that I mentioned - 

 

1. Copy the data.xlsx workbook to another location in your OneDrive.

2. Remove the existing Leave, Balance and Holiday data source connections as shown below from View -> Data Sources section.

 

2018-01-22 09_15_40-PowerApps.png

 

3. Add a new data source and connect to the data.xlsx from the location where you saved it in Step 1 and connect all the 3 tables - Leave, Balance and Holiday. 

 

As the table names remain the same in the previous and the new data.xlsx workbook, the app will connect to the new data source without any issues. You don't need to change the names in any formulas anywhere.

 

Please let me know if this answers your question. Feel free to ask any other question.

 

Thanks


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

10 REPLIES 10
Super User
Super User

Re: Office Template: Leave Request - Failed to read metadata from file source issue

I got the same errors as you said. 

 

Follow these steps:

1. Copy the data.xlsx workbook to another location in your OneDrive.

2. Remove the existing Leave, Balance and Holiday data source connections.

3. Add a new data source and connect to the data.xlsx from the location where you saved it in Step 1 and connect all the 3 tables - Leave, Balance and Holiday.

 

This way you don't need to go to all the formulas in different screens and change the data source names there.

 

Hope this helps!

 

I am still getting an error when I send the leave request e-mail, but it works all fine. Let me know if you find a solution to this. I already tried disconnecting and reconnecting Office 365 and Outlook connections.

 Office 365 E-mail error

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team
Community Support Team

Re: Office Template: Leave Request - Failed to read metadata from file source issue

Hi @pdrampis,

 

Thanks for the feedback.

Issue confirmed from my side.

Please take a try with the steps provided by @ThatAPIGuy, I will take a further analyze on this, and updte here once I got any new findings.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pdrampis
Level: Powered On

Re: Office Template: Leave Request - Failed to read metadata from file source issue

@ThatAPIGuy@v-micsh-msft thank you for your replies.

 

@ThatAPIGuyCan you be a little more specific on how to remove the existing data source locations?
The only way I have found to interect with the existing data sources is to navigate to page containing one (e.g. CompanyHolidaysScreen) selecting the collection and then replacing the data source.


I was hopping the app settings would have information about the data sources but you can only see the custom collections created in the application. That means that I have to actually visit all pages with data sources defined in them, but also pages that reference those sources.

 

Have you found a way to efectively replace the data sources in a central place? If you share a screenshot or describe it with a little more explanation, I can confirm it and accept your proposal as a solution!

 

Thank you

Super User
Super User

Re: Office Template: Leave Request - Failed to read metadata from file source issue

Hi @pdrampis

 

Sure, let me try to give more details about the steps that I mentioned - 

 

1. Copy the data.xlsx workbook to another location in your OneDrive.

2. Remove the existing Leave, Balance and Holiday data source connections as shown below from View -> Data Sources section.

 

2018-01-22 09_15_40-PowerApps.png

 

3. Add a new data source and connect to the data.xlsx from the location where you saved it in Step 1 and connect all the 3 tables - Leave, Balance and Holiday. 

 

As the table names remain the same in the previous and the new data.xlsx workbook, the app will connect to the new data source without any issues. You don't need to change the names in any formulas anywhere.

 

Please let me know if this answers your question. Feel free to ask any other question.

 

Thanks


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

pdrampis
Level: Powered On

Re: Office Template: Leave Request - Failed to read metadata from file source issue

Awesome! I can confirm it is working!

And yes I also have the same problem with the email which is also very crucial. Maybe I will open it in another issue since this one was specifically about resolving the data source issue.

 

Thank you!

Super User
Super User

Re: Office Template: Leave Request - Failed to read metadata from file source issue

Great!

 

Regarding the e-mail issue, it seems to work fine despite of the error message being displayed.

 

Hopefully, it gets solved in the update. 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User
Super User

Re: Office Template: Leave Request - Failed to read metadata from file source issue

The email issue seems to be a part of a bigger problem. Check out this link - https://powerusers.microsoft.com/t5/General-Discussion/Error-message-from-office365-SendEmail/m-p/83...


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

sum
Level: Power Up

Re: Office Template: Leave Request - Failed to read metadata from file source issue

May I have one question?

If you placed a new data soucre on the user's onedrive.

That's mean user can change their records manually/

Do we have another ways to store that data source on centralised place?

Also only HR department can change data.

 

Thanks

Sum

pdrampis
Level: Powered On

Re: Office Template: Leave Request - Failed to read metadata from file source issue

This is another of the shortcomings of the applcaition. Unfortunately you have to share the excel file with everyone that will make use of the app. This kinda beats the purpose of creating an app, if everyone can have access to the data source...

 

Even if you made this application work with a data source like SharePoint, it would propably still require that each user has permission to the specific SP List. The problem is obviously that the application runs under the context of the user. If the application could run with elevated priviledges that the administrator would have given permission to, that would solve the issue.

 

I am currently looking for other alternatives for HR applications in O365. Maybe you can look at the https://staffhub.office.com/

It is more about creating work schedules, but has support for leave request. Hopefully in the future, they will add more HR features.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 293 members 5,288 guests
Please welcome our newest community members: