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 / Check for missing valu...
Power Automate
Unanswered

Check for missing value flow

(0) ShareShare
ReportReport
Posted on by 42

Hi I have a list that get updated with a report every day and it works nicely but some days there are missing reports.

 

how can I check for these missing item? I did a flow that looked at yesterdays reports. all good.

 

then I did a control switch that said check each

or

area1

area2

area3 

area4

 

 

and if it is missing area 2 then it would email me. all ok. then only problem was there is only scope for having about 10 or statements and i have about 20 areas.

 

how can i increase this? 

 

 

Categories:
I have the same question (0)
  • jacktherip Profile Picture
    42 on at

    .

  • jacktherip Profile Picture
    42 on at

    I think I have got closer to my goal

     

    i just need to know how to use the variable in my switch against a choice item in a sharepoint list

     

    jacktherip_1-1654614535254.png

     

  • jacktherip Profile Picture
    42 on at

    Ok to help anyone else coming along

    I changed it to string and now it doesnt error. but doesnt work with my condition on the area value i think because it is a sharepoint list choice column.... more looking into needed.

     

     

    quiet in here isnt it....

  • MelissaReed Profile Picture
    292 on at

    I think you were really close but the part you’re struggling with is ReportArea is a Choice field, and you can’t to a Get Items/Filtering on a choice column.   It can be done, but you’ll need to add a Select and FilterArray call.

     

    A couple of details missing from your description I’ve tried to fill in by looking at your picture.

    This is what I think your situation is:

    • You have a list of ExpectedReports --  a report from Area1, Area2, Area3, Area4, and Area5.
    • Reports come to you from a SharePoint List or library
    • You want to verify that each ExpectedReport exists in your SharePoint List/Library. 

    (with an additional filter for Report Date = Today?)  You don’t show the Get action  in your picture).   I’m leaving filtering by date out of the equation for now.

     

    So going on that, here’s what I would suggest:

     

    MelissaReed_0-1654629455566.png

     

     

    I’ll go through each part step by step.  

     

    MelissaReed_1-1654629455573.png

     

    MelissaReed_2-1654629455576.png

     

    1. arrExpectedReports  -- You’re already on the right track setting up an array and looping through that.
    2. Get Items – pull in the list of things you want to compare against.  I set up a list (see at the very end)
    3. Select --  (this Action is under Variable actions)  

    MelissaReed_3-1654629455578.png

         From: click the Dynamic Variables option (dk blue lightining bolt) and “value” under Get Items”

         Map: type the value name on the LH side, and choose the values from Dynamic Value list under “Get Item”.   The only one you really need is ReportArea, but I included ReportDate in case you needed to filter on that as well.

     

         Note: ReportArea – choose the dynamic value ReportArea Value, not just ReportArea

     

     

    Now you have you report list info in a format you can work with it.

     

     

    1. Apply To Each (under Control actions)   -- set From to arrExpectedReports
    2. Compose  (just type it into the Action Search it will come up)

     

    MelissaReed_4-1654629455579.png

    Choose the formula button (fx) and enter item()

    Don’t type it directly into the compose box – it’s a formula, not text value.

    What we’re doing is buffering the current loop’s ReportArea value from the array.

     

    3. Filter array  - (type Filter, then choose “Data Operations” and Filter array will be in that list)

    MelissaReed_5-1654629455580.png

     

    From: from Dynamic content, look for “Select” (gray bar) and choose the “Output” below it in.  This is pointing to the output of the Select statement above.

     

    Filter:  in both cases choose from Dynamic Content / Expression, don’t type the text in directly.

    Value 1:  from Dynamic Expression, enter item()?['ReportArea']

    Value 2:  from Dynamic Content, look for “Compose” (gray bar) and choose “Output below that – this is the array value we buffered at the top of the loop.

     

    This is asking the question: “does the current array value (expected report) exist in the list of reports I have?”

     

    4.  Condition --  checking to see if the filter found a match.

    Value 1 – from Dynamic Expession length(body('Filter_array'))

    Condition “is equal to”

    Value 2 – 0    (zero – if the length of the filtered array is zero, the report was not found)

     

    5. If Yes, send yourself an email; if no do nothing.

     

    Bonus points:  define a string at the top of your flow (MissingReports), and instead of an email, do an Append To String  to add the current array Report area  (Outputs('Compose').  Then outside the loop if length(variables(‘MissingReports’)) > 0, send yourself an email containing variables(‘MissingReports’)

     

     

    Here’s the reports list I set up:

    MelissaReed_6-1654629455582.png

     

     

    Hope this helps get you where you want to go!

  • jacktherip Profile Picture
    42 on at

    Dear Melissa

    Thank you an amazingly detailed reply. 

     

    I am working on it, just didnt want you thinking I wasnt replying. Im trying to tweak it. I will update on how im getting on. very interesting solution thank you

     

     

  • MelissaReed Profile Picture
    292 on at

    No worries on the delay -- we all have day jobs, right?

    @jacktherip I received an email with content I'm not (yet) seeing on this page 

    1. "it keeps saying the 'from' property value in the 'query' action inputs is of type 'String'. The value must be an array."

    Please reference the box name (send screencap if possible)  Not sure what you mean by Query Action.

     

    2. FilterArray/BadRequeset.    Send a screencap of (all actions expanded) 

             1) where you declare your array variable

             2) the SP GET call including any filtering info  (wipe the URL/List name if you wish)

             3) the Select statement that should come right after that GET

             4) the Filter Array action

     I'll be watching for your reply and respond as I'm able.  I know it's frustrating to be so close and yet so far!

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard