Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Boolean result not accepted in a boolean variable

(1) ShareShare
ReportReport
Posted on by 46
I have a variable, initialized as boolean:
 
I try to set the value with a empty() function:
According to the documentation, the empty() function should give me a boolean answer:
 
But I get:
 
What is wrong with my formula?
 
  • Suggested answer
    fsuarezoedt Profile Picture
    46 on at
    Boolean result not accepted in a boolean variable
    Sorry for the delay
    The problem is that I forgot the 'body/' before the 'gs_fechavencimientodocumento'.
    Now, using the complete value:
     
    I get:
     
     
     
    So the problem seems to be that I should be getting a meaningful error.
  • Suggested answer
    faschimi Profile Picture
    60 on at
    Boolean result not accepted in a boolean variable
    This guy says that empty() function cannot be nested, maybe this answers your question?
    https://manueltgomes.com/reference/powerautomate-function-reference/power-automate-empty-function/
  • Suggested answer
    David_MA Profile Picture
    11,531 Super User 2025 Season 1 on at
    Boolean result not accepted in a boolean variable
    I am not sure about this since I cannot think of where I may have used an expression in a set variable action. If the action where you are having the issue is a create variable action, set the default to either true or false. Then use a set variable action with the expression above.
  • fsuarezoedt Profile Picture
    46 on at
    Boolean result not accepted in a boolean variable
    @gopala Krishna
    But my question is WHY empty(), a function that should return a boolean value, can't be but on a boolean variable?
     
    @fashimi
    Yes, that worked, but didn't solve my question. WHY removing the string() changes the empty() behaviour? I mean, it's a boolean function, right? I should be able to put that function inside a boolean variable...
     
    @NathanAlvarez24, it's a null
  • Suggested answer
    Gopala_Krishna Profile Picture
    1,491 on at
    Boolean result not accepted in a boolean variable
    You can try using the expression
    null(string(outputs('Target')?['gs_fechavencimientodocumento']))
     
  • Suggested answer
    faschimi Profile Picture
    60 on at
    Boolean result not accepted in a boolean variable
    Did you try to remove string() function from the formula? It would be:
    empty(outputs('Target')?['gs_fechavencimientodocumento'])
     
  • NathanAlvares24 Profile Picture
    1,673 Super User 2025 Season 1 on at
    Boolean result not accepted in a boolean variable
     
    May I know what is the output of this? Does it return something? Please do provide a screenshot of the output of this:
     
    outputs('Target')?['gs_fechavencimientodocumento'])
     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492