Jump to content
  • 0
Sign in to follow this  
Wernon

Convert Decimal to HEX Format

Question

Hi,

I want to create a  converter from decimal to HEX format. All the values are saved in the table.

So the form should take the decimal number from the table field 1, convert and save the HEX value to field 2. 

 

I did not find any SQL solution. 

 

I would appreciate any ideas regarding the solution. 

 

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I had this case and I just used single update form as Data Page.

  • I Used "NumberNormal" as column name i should to convert.
  • Added another column with name HexNum.
  • After that i added simple HTML block in the bottom of Update Data Page and put this snippet of code.

 

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {

var normal = Number(document.querySelector("#EditRecordNumberNormal").value);
hexString = normal.toString(16);
if (hexString.length % 2) {
hexString = '0' + hexString;
}

document.querySelector("#EditRecordHexNum").value = hexString;
});
</script>

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...