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

Last Data modified

I need to display the last data modified date and time on my PA screen. How can I do it? I am using the text box but I am not aware of the formula to use for displaying the time and date when the excel file on my Onedrive was updated.

1 ACCEPTED SOLUTION

Accepted Solutions


@rehankazi wrote:

@v-bofeng-msft Thanks for the advice, API permission wont work for me as i dont have admin permission. I will go with automate. I am getting stuck at the below step. Are there more steps to be added?

 

rehankazi_0-1633610784462.png

 


You've done what you need to do with the flow. Now, head back to PowerApps and connect your app to this flow in the OnSelect property of a button, for example. It will create a statement that looks like: MyFlowName.Run()

 

You might find it easiest to Set() the value of a variable to the return from the statement, for example:

Set(varFileInfo, MyFlowName.Run())

 

Bryan 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
BCLS776
Super User
Super User

You could do this through a Power Automate flow that responds to your app:

BCLS776_0-1633567857721.png

Hope that helps,

Bryan

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Thanks Bryan

 

But I dont want to have flow added, is there any way to show on the PA screen when ever the source excel file was modified or updated?

My source excel file is on Onedrive, and whenever it is modified the date and time should show on the PA screen.

Hi @rehankazi , @BCLS776 is right: the metadata for the data source is not read by PowerApps when it comes in, and you only have the option of selecting the data columns themselves. If you don't want to use  a Flow to grab the metadata, the only other solution would be to add a hidden column to your Excel that records the last modified time on save. That way it will appear as a data column to be used in the PowerApp.

 

Hope that helps

Ralph

Hi @rehankazi :

I’m afraid the solution provided by @BCLS776  is already the best. If you don’t want to use Power Automate, the only way to do this is to call the Graph API.

https://graph.microsoft.com/v1.0/me/drive/root/search(q='FileName')

You need to use this API to create a custom connector, and then you can call it directly in PowerApps to get the last modification date of the file:

vbofengmsft_0-1633592374739.png

vbofengmsft_1-1633592731992.png

This video may help you build a custom connector.

How to connect Microsoft Graph API in PowerApps 

Best Regards,

Bof

 

rehankazi
Advocate I
Advocate I

Thank you @BCLS776  and @RalphyC  for the tips. 

@v-bofeng-msft Thanks for the advice, API permission wont work for me as i dont have admin permission. I will go with automate. I am getting stuck at the below step. Are there more steps to be added?

 

rehankazi_0-1633610784462.png

 


@rehankazi wrote:

@v-bofeng-msft Thanks for the advice, API permission wont work for me as i dont have admin permission. I will go with automate. I am getting stuck at the below step. Are there more steps to be added?

 

rehankazi_0-1633610784462.png

 


You've done what you need to do with the flow. Now, head back to PowerApps and connect your app to this flow in the OnSelect property of a button, for example. It will create a statement that looks like: MyFlowName.Run()

 

You might find it easiest to Set() the value of a variable to the return from the statement, for example:

Set(varFileInfo, MyFlowName.Run())

 

Bryan 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,022)