cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Post Prodigy
Post Prodigy

How do I filter data based on a field and Lastsubmitted id

How do I filter data based on a field and Lastsubmitted id 

I Need to find the lastsubmitted ID in a sharepoint list. based on a variable  

 

Thanks

David

My current Formula looks like this: 

Filter(t_nsc_trackcode_LogIn_and_LogOut_Daily, NscRacfid = lbl_User.Text)

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User
Super User

You can create a variable Onvisible:

Set(LastSubmitted,Last(Sort(Datasource,Descending)).ID)

 

Then filter:

Filter(t_nsc_trackcode_LogIn_and_LogOut_Daily, NscRacfid = lbl_User.Text And ID=LastSubmitted)

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

View solution in original post

4 REPLIES 4
eka24
Super User
Super User

You can create a variable Onvisible:

Set(LastSubmitted,Last(Sort(Datasource,Descending)).ID)

 

Then filter:

Filter(t_nsc_trackcode_LogIn_and_LogOut_Daily, NscRacfid = lbl_User.Text And ID=LastSubmitted)

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

View solution in original post

The problem with that is 30-40 people data entering and I need the last ID  for that person specifically.

Dave

This is patching to specific ID

ok this is somewhat working but the Admin_Logged_Out: Now()   keep reverting to yesterdays data ??

 

 

Patch(
    t_nsc_trackcode_AdminLogIn_and_AdminLogOut_Daily,
    First( Filter( t_nsc_trackcode_AdminLogIn_and_AdminLogOut_Daily, ID = TextInput2.Text ) ),
    {
        NSC_ID_Racfid: lbl_Racfid.Text,
        Racfid_Name: lbl_associate_name.Text,
        Admin_Logged_Out: Now()
    }
);

 

 

Hi @DAVIDPOWELL :

Could you tell me:

  • Is your current time inconsistent with the time saved to the data source?
  • What is your data source?SharePoint Or excel?

I assume your data source is a SharePoint list.

Firstly,let me explain why you encounted this problem.

The key is that your current time zone is inconsistent with the SharePoint site's time zone.When you save data, the time will be adjusted according to the time zone of the SharePoint site by default.

Secondly,there are two ways to solve this problem.

1\Set the region of the SharePoint site to your current region

61.gif

2\Use the dateadd function to add the time zone deviation value based on the current time

for example:

 

Patch(
    t_nsc_trackcode_AdminLogIn_and_AdminLogOut_Daily,
    First( Filter( t_nsc_trackcode_AdminLogIn_and_AdminLogOut_Daily, ID = TextInput2.Text ) ),
    {
        NSC_ID_Racfid: lbl_Racfid.Text,
        Racfid_Name: lbl_associate_name.Text,
        Admin_Logged_Out: DateAdd(Now(),8,hours)/*I assume the time is off by 8 hours*/
    }
);

 

Best Regards,

Bof

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 (2,511)