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 III
Super User III

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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (21,242)