cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pure96
Frequent Visitor

Pull Data From Newest Entry

Hello!

 

I have a flow that grabs data from a list of repairs that our warehouse technicians perform daily and reads the serial number of an item and other criteria to see if the renewal date of that item is coming up. If the renewal date is 30 days or less from today's date an email will be sent to the appropriate manager notifying them. When that renewal date approaches and the technician replaces the filter on an item, for example, they will re-enter that same item to the list. So now the list will have two items with the same serial number but different renewal dates. I'm stumped and want to know if there is a way to keep both entries, but have the flow read off the most recent entry's renewal date and not the older entry.

 

Thank you!

4 REPLIES 4
v-bofeng-msft
Community Support
Community Support

Hi @pure96 ,

 

Could you please tell me what the data source is? Is it a SharePoint list?

 

Best Regards,

Bof

Yes, the data is being pulled from a SharePoint list. 

Hi @pure96 ,

 

I’ve made a test for your reference:

1\My SP list:

vbofengmsft_0-1656472025167.png

2\My flow

vbofengmsft_1-1656472041167.png

vbofengmsft_2-1656472049151.png

3\You can get the record of the latest expiration of each serial in the compose in each loop

vbofengmsft_3-1656472154499.png

vbofengmsft_4-1656472162831.png

Best Regards,

Bof

 

 

 

 

I tried and got this error message at the first "Filter Array" action:

 

The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@and (less(item()?['Renewal_x0200_Date'], addDays(utcNow(), 30)),greaterOrEquals(item()?['Renewal_x0200_Date'], utcNow()) )' failed: 'The template language function 'less' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'.

 

I also need this to work for two other renewal dates, PAP renewal date and Concentrator renewal date. Is that possible?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,488)