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.

 

 

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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (5,150)