Jump to content
  • 0

Significant Digits In Numbers


Thor
 Share

Question

I have a datapage that automatically insert numbers from a Caspio table into an html generated table on a Details page. Calculated values are also inserted into the table on the Details page.

The problem is that a number such as 43 is incorrectly inserted into the table as 43.00. A number such as 1.23 is correctly inserted into the table as 1.23. What code do I need to insert so that 43 is inserted as 43 and not as 43.00? Numbers such as 1.23 would still need to be inserted as 1.23, and not simply as 1.

 

Thanks,

 

Thor

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi MayMusic,

 

Thanks, but formatting for number field type is set to None. Common English is the set localization for the Datapage.

The number fields are called within an html block. Refer below to the html code use to generate a portion of the table where the numbers are inserted into cells.

 

    <td width="111" valign="top" style="border: 1px solid rgb(0, 0, 0); vertical-align: top; letter-spacing: 0px; word-spacing: 0px;">
        <p align="center" class="MsoNormal" style="text-align:center"><span style="font-family: Verdana; font-size: 10pt; ">[@field:MyNumber#]</span></p></td>
      <td width="111" valign="top" style="border: 1px solid rgb(0, 0, 0); vertical-align: top; letter-spacing: 0px; word-spacing: 0px;">
        <p align="center" class="MsoNormal" style="text-align:center"><span style="font-family: Verdana; font-size: 10pt; ">[@calcfield:1#]</span></p></td>

 

Specifying the number of decimal places to 2 digits via localization or custom formatting still displays a number such as 90 as 90.00. I need 90 to display as 90.

Specifying the number of decimal places to 0 digits would display a number such as 5.37 as 5. I need 5.37 to display as 5.37.

 

What would you try next?

Link to comment
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...
 Share

×
×
  • Create New...