web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Flow Failure

(0) ShareShare
ReportReport
Posted on by 26

Hi all

 

I'm trying to suss why a flow keeps failing and am stumped. I have various SharePoint lists that I was 14 days notice when a certificate is going to expire. I managed to get the first flow running on a list a while back so saved it as a template, since them I have gone it and changed the SharePoint list name and the relevant column name and got it working on the second list. However, I'm trying to use same method on third list, I've changed the list name successfully, changed the for  so that it refers to the relevant column in the list but I keep getting error message (see picture)

 

Below is formula I'm using

equals(formatDateTime(item()?['9001_x0020_Expiry_x0020_Date'], 'MM/dd/yyyy'), formatDateTime(addDays(utcNow(), 14), 'MM/dd/yyyy'))
 
Any ideas, I'm new to working with flows
 
thanks
 
Darrenflow 27.04.2020.png
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at
    Re: Flow Failure

    Hi!

    In your third list you have at least one item with its Expiry Date column empty, this means Flow get a 'null' value.

    So either you make sure the column is always filled or, use a different approach

    If you need a different approach, I would suggest to add a 'Filter Array' action block just before your 'Apply to each'

    So you should assign 'Get items' output as 'Filter array' input.

    THen configure the following expression on the left term of 'Filter array' condition rule

     

    empty(item()?['9001_x0020_Expiry_x0020_Date'])

     

    Next, configure the following expression on the right term of its condition rule

     

    false

     

    Next, select operator 'equals'

     

    If you are not familiar with expressions, follow these steps to add them:

    https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

     

    Finally, remove 'Get items' output curently assigned to 'Apply to each' and assign 'Filter array' outputs instead

     

    Hope this helps

     

  • CU26081010-2 Profile Picture
    26 on at
    Re: Flow Failure

    Thanks, yeah previous lists all certificates had to have an revision due date, however this list if a certificate type doesn't apply to a supplier, it will be left blank.

     

    I'll go and try follow your instructions, wish me luck lol

     

    thanks

     

    Darren

  • CU26081010-2 Profile Picture
    26 on at
    Re: Flow Failure

    I can seem to get the operator set at 'equals' option not coming up, picture below of where I'm at now

    flow 27.04.2020.png

  • efialttes Profile Picture
    14,756 on at
    Re: Flow Failure

    Hi!

    My memory is not good enough 😅

    'Is equal to' operator is the one I was trying to suggest.

    Is it working now?

     

    Please also note you can simplify your original Condition action block (the one inside the 'Apply to each'). Your left term looks like

    equals(formatDateTime(item()?['9001_x0020_Expiry_x0020_Date'], 'MM/dd/yyyy'), formatDateTime(addDays(utcNow(), 14), 'MM/dd/yyyy'))

    ...so I guess you are using 'is equal to' operator, and also added expression true / false as the right term, right?

     

    If so you can just apply the following expression to the left...

    formatDateTime(item()?['9001_x0020_Expiry_x0020_Date'], 'MM/dd/yyyy')

    ...apply the following expression to the right...

    formatDateTime(addDays(utcNow(), 14), 'MM/dd/yyyy')

    ...operator 'is equal to' / 'is not equal to' (depending on which boolean you are currently comparing with: true / false).

     

    Hope this helps

  • alrezac Profile Picture
    on at
    Re: Flow Failure

    Hi,

     

    When in doubt the "contains" operator should work for almost every scenario. Try switching to that and giving that a try if the "is equal to" doesn't work. In addition you can also use the compose action to see what the variable is at any point by checking the post run.

     

    Regards,

     

    Alex

     

    -------

     

    Community Support Team _ Alex Rezac
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • CU26081010-2 Profile Picture
    26 on at
    Re: Flow Failure

    Hi

     

    I couldn't get flow working so I decided to try and strip it back a bit and check flow prior to adding Filter Array. In another date column on same SharePoint list I added a few missing dates so that the column was complete

     

    I then changed the expressions as you suggested to:

    formatDateTime(item()?['SQ_x0020_QHSE_x0020_Approved'], 'MM/dd/yyyy')
    formatDateTime(addDays(utcNow(), 7), 'MM/dd/yyyy')

     

    I then changed a date in the column to 7 days from now and ran test and I get error message below, however it still triggered an email to me

    Unable to process template language expressions for action 'Condition' at line '1' and column '2824': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

     

    Any ideas?

     

    thanks

     

    Darren

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 532 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 461 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 256

Last 30 days Overall leaderboard