Skip to main content

Notifications

Calling Actions from Copilot Studio
Answered

PVA Flow to detect empty cell in excel is evaluating false

Posted on by 88

I have an inventory flow that is initiated by my PVA Chatbot and returns values to the PVA Chatbot to check for inventory where there is currently no value in a specified column. The issue I'm having is that both ways I've tried to have the flow evaluate cell data has failed. I've tried to check condition of column "Contract_Num" is equal to "null" but condition evaluates to false for all 19 entries even though 2 of them should be returning true. I've also tried to check condition where column "Contract_Num" is equal to the expression "empty(items('Apply_to_each')?['ExcelField'])" but again all instances evaluate to false when 2 should be evaluating to true. Is there an explanation to this? Is there another way to achieve this that I haven't discovered? Please see screenshots for additional info.

Spreadsheet being referencedSpreadsheet being referenceddebug2.PNGdebug3.PNGdebug4.PNGdebug5.PNGdebug6.PNG

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 1,990 on at
    Re: PVA Flow to detect empty cell in excel is evaluating false

    The output is still an array that needs to be processed to turn it into a formatted string for return.  The point is that its a smaller array that needs to be processed than the one you are processing now.  So it should still be a bit faster.

  • kgreen8790 Profile Picture
    kgreen8790 88 on at
    Re: PVA Flow to detect empty cell in excel is evaluating false

    Yes, that does seem to speed things up on the flow. I noticed when I append it to my string variable that gets returned to PVA it includes a lot of curly braces and square brackets that I don’t get when I do it using the other method. Any idea why it’s displaying these using filter array?

  • Pstork1 Profile Picture
    Pstork1 1,990 on at
    Re: PVA Flow to detect empty cell in excel is evaluating false

    There is an advantage to using filter array, because then you don't have to compare the value on every row. You can get a subset of rows that meet your condition without doing extra actions.

  • kgreen8790 Profile Picture
    kgreen8790 88 on at
    Re: PVA Flow to detect empty cell in excel is evaluating false

    Your solution is valid. I did end up achieving it by simply checking the condition against "contains" "string(0)" and this worked as well. Thank you for your swift response.

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 1,990 on at
    Re: PVA Flow to detect empty cell in excel is evaluating false

    Instead of using a condition try using a filter array on the output of the list rows where that column is equal to null, or you may have to check against and empty string.  The length() of the filtered output is the number of rows with null values in that field.  The resulting array will be the rows with empty cells.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,990

#3
Expiscornovus Profile Picture

Expiscornovus 1,700

Featured topics