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

@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 

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

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.

ScottShearer
Super User III
Super User III

@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

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"

@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

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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA 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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (2,608)