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
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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,732)