Convert a Decimal to a Hexadecimal


Userlevel 3
Badge +8

I have an ask from a user to calculate the Hexadecimal value using a decimal field.

I'm not even sure where the start. the HEX2DEX command does not work in a calculated column. so I thought maybe I could do it with RegEx... something like;

s/([A-Za-z0-9_])/=printf("%#02x", submatch(0))/

but I'm not sure how to get the results by configuring the regular expression workflow action.

Any ideas on how I can accomplish this?

Thanks

Kassie


2 replies

Userlevel 5
Badge +14

eg. using javascript inplace conversion

Number(DecCtrl).toString(16)
Userlevel 3
Badge +8

I saw this JS in my massive Google search but where do I put it? In a calculate value on the form? I tried in in a calculated column on the list with no luck.

EDIT:

Hey it works in a calculated value on the form. I can grab it from there the populate the field!

Thanks

Kassie

Reply