function for binary

function for binary



Is there a direct way without to create in purpose a function to deliver the binary of an integer number? I have never seen any buit-in function to parse/convert  an integer number to binary in OS. Such a common conversion and it seems we need to set the function by ourselves... i would like to have a built-in function already ready to be used... like integertobin(number). The integertoboolean() does not serve the purpose of course.

Hello Jorge,

I do not know of any "built in" function to convert an integer to binary.
Not only. I never had the need to use such a function. 

Could you explain what do you need to do?
Like, why do you need to convert an integer to binary?


Eduardo, I will need a binay number, because a very important information sits in the second digit from the right  of such binary. I have solved it doing a function in sql server studio that writes the binary of the several integers to a new column. In this way I can use this information to do the logic in OutSystems. I have created a trigger (in sql server Management studio) to update any new integers (along with other information) that come to the table and converts the integer to bin and writes it in the binary column. In OS I consult this table and can retrieve the binary number and do a simple logic with substring. :)

So, you are telling that a BINARY digit is important? Like

00000010 => this one? The 1 or 0 at the second digit of the integer of value?

yep, it tells an important information for the user account control. :) it means a disable account in your case. :)