I'm having an issue with hex2bin. When I test in the Appian functions page using hex2bin("A5A5A5A") I get a value. When I test using hex2bin("A5A5A5A5") the function returns a zero. This is the same response that I get in my interface. What's going on with that?
Discussion posts and replies are publicly visible
I believe it is working as expected since you are testing the function for different input values - "A5A5A5A" and "A5A5A5A5".
Yes, I am. "A5A5A5A" returns an answer, "A5A5A5A5" returns zero.
Siddharth's answer checks out. I get the same result in Appian verus on the Appian Functions page, for both inputs - the one with the extra "5" at the end returns 0 in both places. As for why, I expect it might be because "a5a5a5a5" exceeds the bounds for the Integer data type.
I need to convert a data variable that represents a picture which has been given to me as HEX code. It is somewhat longer than 7 characters. Can I convert this without parsing it?
Where do you intend to store the resulting binary string, and what do you intend to do with it?