cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alex221
Regular Visitor

Retrieve last submitted data from SharePoint List to Power Apps based on the logged in user

Hi everyone,

I am building my first canvas Power App and I am a bit stuck with a problem that I would like to ask help with.

The situation: I have a SharePoint List, which is updating it's data and columns from the Power App I built (Patch command), it is not a Form but individual dropdowns. My first column is the 'Title', which will consists of email addresses after I add users to the SP list, so right now it is only my email address being shown. My next 4 columns I have no problems with, it is dropdown menus and a number text box submitted by the user from the app. The last column is 'Time submitted'. The app is going to be used by 15-20 people and they will need to use the app once a week.

The problem: I would like to showcase the last submitted date and time by the person who is going to use the app in that very moment, therefore I will need to filter the SP list somehow based on their names or email addresses (?). I have no idea how to do that and I would like to ask for help with that. 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @alex221 ,

If you are after this on a Label

LookUp(
   Sort(
      ListName,
      Modified,
      Descending
   ),
   'Modified By'.Email = User().Email
).Modified
         

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

17 REPLIES 17
Nogueira1306
Super User
Super User

Hey. Does this help?

 

https://www.spguides.com/powerapps-lastsubmit/ 

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Hi @Nogueira1306 , thanks for the fast reply and the link.

The given instructions in the link would help, if I was using a Form in my Power Apps. The only thing so far I could manage to get data back with is:

 

Last('SP List name').'Time of Submit'


However, the command above does not filter for logged in users/email addresses or the Title column, so my problem is still there. Do you have any suggestions for that?




Okay, please explain your problem better. You want to show the last user and when he created the item?
Which DB are you using? SP, SQL?

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

I am using SP as my DB.

 

powerapp.PNG

On the attached screenshot you can see the different columns and data that was patched from the Power App. Based on which user is logged into the Power App and submitting information to the SP list, I would like to have the last 'Time of Submit' shown back in the Power App for them in the following way:

powerapp2.PNG

Hmmmm... Ok: First(Sort(Filter( SPList; 'Created By' = User().Email); 'Created';Descending).'Created'

 

It is something like that. Just check the field names 

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

It shows and error unfortunately and it says 'Expected operator. We expect and operator such as +,* or & at this point of the formula'

Concat(First(Sort(Filter( SPList; 'Created By' = User().Email); 'Created';Descending);'Created';"")

 

Set that on the default of the text input

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Same error again: 'Expected operator. We expect and operator such as +,* or & at this point of the formula'

Show me the error

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.

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 (3,230)