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 / 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
    12,978 Super User 2025 Season 2 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

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard