cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Function "binary" not returning binary string

I am currently trying to implement masks into one of my flows.

Unfortunatelly "binary" function is very uncooperative, instead of binary string, what I get from it is base64 string... in JSON.

 

What I input into compose:

binary('11')

What I expect:

1011

What I get:

{
  "$content-type": "application/octet-stream",
  "$content": "MTE="
}
 
4 REPLIES 4
Highlighted
Super User II
Super User II

Re: Function "binary" not returning binary string

If you'll review the Binary Forkflow Definition Language documentation, please notice that the binary function states:

Return the binary version for a string.

Meanwhile, you are inputting 11 which is an integer, not string - and that is the reason for the error. To use the Binary function with an integer, you must first convert it to a string. To do so, you can use the Compose action

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Function "binary" not returning binary string

I am feeding it '11' not 11, which is a string...

But here it is with a "non-numerical" string, result is the same, input string encoded as base64 in JSON.

lgIgiZ4mFJ.pngB58dhMwOEt.png

Highlighted
Community Support
Community Support

Re: Function "binary" not returning binary string

Hi @mrpilipo ,

 

I did a test on my side and the test results are consistent with yours.

 

It seems that the result of this function conversion has some discrepancies with the results of other binary conversions.

 

Basically, the content is encoded by base64() function.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: Function "binary" not returning binary string

Hello,

 

Any solution on this topic? I'm having the same issue: I cannot convert a string to binary no matter how I try to do it.

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,741)