cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
patricia_r
Helper I
Helper I

If condition expression on a yes or no column data verse

Hello,

 

I have been scratching my head on this one for a bit now. I don't seem to find what i am missing or doing wrong. I have the following expression that checks if the dataverse column is yes or no and base on that then i want print a letter. 

 

EX. If(equals(body('Parse_getOutput_JSON')?['eh_isdeleted'],true),'D','A')

If the eh_isdeleted column in dataverse is yes then i want to print a letter D and if its not true/yes then i want to print a A 

currently its printing A for yes an no. How can i fix that?

 

 

3 REPLIES 3
abm
Super User
Super User

Hi @patricia_r 

 

Most likely your Parse JSON is not treating that as boolean. What's the data type in your Parse JSON Schema? 

You could try

 

If(equals(bool(body('Parse_getOutput_JSON')?['eh_isdeleted']),true),'D','A')

 

If the above doesn't work please post a sample screenshot and the run history data of en_isdeleted field.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

@abm Thank you for your response. The Parse JSON schema is a boolean

 

Tired your suggestion but it did not worked got error: 

 

'Append_to_string_variable_2' inputs at line '1' and column '29322': 'The template language function 'bool' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

},
                    "eh_isdeleted": {
                        "type""boolean"
                    },

Hi @patricia_r 

 

Looks like this is a data issue. Check the run history and see what data is returned for the Parse JSON step.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (2,319)