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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow Help - issue with...
Power Automate
Unanswered

Flow Help - issue with Strings vs. Arrays

(0) ShareShare
ReportReport
Posted on by 44

Hiya,

 

I'm trying to build a scheduled flow whereby an automated email is sent if a null value is recorded after 3 days of a date value in a separate column.

 

I.e. Item added to SP List, 27/08/21 [Column A] - Scheduled flow checks date input in [Column B] 29th/30/31st

On the 31st, no date value is in [Column B], the flow runs and an email is sent to confirm that [Column A] hasn't been actioned.

 

How can I build this? The columns are not going to be 'empty' to start with and will always be updated/contain data, I have been trying to use the 'String' formula:

@And(less(item()?['@{items('Apply_to_each')?['ColumnA']}'], addDays(utcnow(), -3)),not(equals(coalesce(item()?['@{items('Apply_to_each')?['ColumnB']}'],'null'),'null'))

 

So far no luck and error of:

The 'from' property value in the 'query' action inputs is of type 'String'. The value must be an array.

 

Any help much appreciated!

Thank you 😁

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @HG_2021,


    You could use the utcNow function and compare that with the Column A datetime field. With the and function you can also check if Column B is empty.

     

    Below is an example expression for that. The outcome of this is either true or false.

     

    and(equals(utcNow('yyyy-MM-dd'), formatdatetime(adddays(items('Apply_to_each')?['ColumnA'], 3), 'yyyy-MM-dd')), empty(items('Apply_to_each')?['ColumnB']))

     

     

  • HG_2021 Profile Picture
    44 on at

    Hi There,

     

    Thank you for your reply, unfortunately it's still chucking out the same error requesting an array, not a string:

    The 'from' property value in the 'query' action inputs is of type 'String'. The value must be an array.

     

    Do you know any way around this at all? Driving me mad!

     

    Thank you 😁

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @HG_2021,

     

    Can you share a screenshot of the action were you are using this expression and/or getting this error? 

  • HG_2021 Profile Picture
    44 on at

    Hi There,

     

    Thank you for your reply, please see below

     

    Thanks again 😁

    Example1.png

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @HG_2021,

     

    I see you are using a Filter array action. Based on the error it looks like you are inputting a string value instead of an array in that action. Is there a specific reason why you are using a filter array action within an apply to each? Can you share a screenshot of the setup of that action in edit mode?

     

    Alternatively, you could remove the filter array and use a condition action with that expression instead.

     

    filterarray_input.png

     

  • HG_2021 Profile Picture
    44 on at

    Hi there,

    Thank you for your response, it's still not a fan of the coding. 

    I have set out as per a condition as you suggested as it doesn't necessarily require a Filter Array but I am still experiencing some glitching in the formula.

     

    Thank you again for your help so far! 😁

    Example2.png

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @HG_2021,

     

    It looks like some of your items have an empty Column A, is that correct?

     

    If so, we need to add another check for empty.

    and(if(empty(items('Apply_to_each')?['ColumnA']), false, equals(utcNow('yyyy-MM-dd'), formatdatetime(adddays(items('Apply_to_each')?['ColumnA'], 3), 'yyyy-MM-dd'))), empty(items('Apply_to_each')?['ColumnB']))
  • HG_2021 Profile Picture
    44 on at

    Hi There,

    Sorry for the slow reply!

    This has made the flow run so thank you - however it isn't then carrying out the next action as the system is returning 'False' There are empty items in both Column A and Column B I don't know if this effects the formula at all?

     

    Thank you again for your help 😁

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @HG_2021,

     

    I was assuming that if Column A is empty it is hard to determine what three days later is, since you don't have any value 😁. That is why I am returning false. 

     

    When Column A is not empty it will check if it is three days later.

     

    Do you have a different requirement for an empty Column A?

  • HG_2021 Profile Picture
    44 on at

    Hello hello!

     

    So if Column A is empty it can be ignored. If Column B is still empty 3 days after a date input in Column A the Flow needs to fire off an email to advise Column B needs to be followed up.

     

    Thank you very much for your help 😁

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

Forum hierarchy changes are complete!

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard