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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Boolean result not acc...
Power Automate
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?
 
Categories:
I have the same question (0)
  • NathanAlvares24 Profile Picture
    1,714 Moderator on at
     
    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'])
     
  • Suggested answer
    faschimi Profile Picture
    60 on at
    Did you try to remove string() function from the formula? It would be:
    empty(outputs('Target')?['gs_fechavencimientodocumento'])
     
  • Suggested answer
    Gopala_Krishna Profile Picture
    1,495 on at
    You can try using the expression
    null(string(outputs('Target')?['gs_fechavencimientodocumento']))
     
  • fsuarezoedt Profile Picture
    46 on at
    @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
    David_MA Profile Picture
    15,025 Super User 2026 Season 1 on at
    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.
  • Suggested answer
    faschimi Profile Picture
    60 on at
    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
    fsuarezoedt Profile Picture
    46 on at
    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 227

#2
David_MA Profile Picture

David_MA 204 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 177

Last 30 days Overall leaderboard