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

Getting Items past 4 years Old

Hi guys, new to this here.

 

Trying to Get Items from our list of students where 'Enrollment Date' more than 4 years old in order to archive them (move them to another list)

 

I've tried a few methods but with no success. Any recomdations would help. Thank you.

Annotation 2019-04-10 165737.jpg

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Getting Items past 4 years Old

@jjMedrano 

 

The filter query probably needs to look like the screen shot below.  Please note the single quotes around the expression.  Also, the expression must be entered in the expression windows and not as plain text.

Expression.jpg

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Highlighted
Super User
Super User

Re: Getting Items past 4 years Old

@jjMedrano 

What you'll need to do is to retrieve each related payment for each student before archiving the student record.  My screen shots below assume that the is a lookup column in the student payments list that points to the student list.  In my example the lookup column is called Student.  The ID of the student is actually stored in the lookup column.  So, it makes it easy to find any student payment associated with a student.

Once you retrieve the payments, you need to loop through each and archive (create a new item in another list and delete the original).

 

Please note that the ID column is only exposed in Dynamic properties when you click on "See more".

 

Student1.jpgStudent2.jpg

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

5 REPLIES 5
RookieI Resolver I
Resolver I

Re: Getting Items past 4 years Old

It seems that the expression used in Filter Query is incorrect.

 

Missing operator, this should be le.

 

In addition, there are errors in the usage of Expression.

Super User
Super User

Re: Getting Items past 4 years Old

@jjMedrano 

 

The filter query probably needs to look like the screen shot below.  Please note the single quotes around the expression.  Also, the expression must be entered in the expression windows and not as plain text.

Expression.jpg

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

jjMedrano
Regular Visitor

Re: Getting Items past 4 years Old

Perfect! Thank you so much. It works!

 

I have another issue that ties to the one before.

There is a 'Students Payments' list associated with the 'Students' list

 

Where.

Annotation 2019-04-11 115922.jpg

 

 


I would like to move payments associated with the students that got moved to archive to an archive list.

In other words, only move the payments of the students that got archived.

 

Is there a way to move only payments of Students "Enrollment Date" Past 4 years

Annotation 2019-04-11 120457.jpg

 

Where

Annotation 2019-04-11 115922.jpg

 

 

'Students' "ID" match 'Student Payment' "Student"

Highlighted
Super User
Super User

Re: Getting Items past 4 years Old

@jjMedrano 

What you'll need to do is to retrieve each related payment for each student before archiving the student record.  My screen shots below assume that the is a lookup column in the student payments list that points to the student list.  In my example the lookup column is called Student.  The ID of the student is actually stored in the lookup column.  So, it makes it easy to find any student payment associated with a student.

Once you retrieve the payments, you need to loop through each and archive (create a new item in another list and delete the original).

 

Please note that the ID column is only exposed in Dynamic properties when you click on "See more".

 

Student1.jpgStudent2.jpg

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

jjMedrano
Regular Visitor

Re: Getting Items past 4 years Old

Perfect. You're a life savior. Thank you so much. It works like a charm.

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,697)