Result of field format disappearing in portal

Discussion created by ChristopherTan on Oct 13, 2015
Latest reply on Oct 14, 2015 by ChristopherTan

I am using Mac OS X 10.7, FM10.

I have two tables. In Table with the portal I wish to display within the portal several fields that have mandatory numbers in fixed length. Eg. a length of 8 numbers to append "0" in front (right justify).

The related table I obtain the figures from field "Tax PCB" - use a calculation in a new field "C_IRD_PCB Amount_Detail Record" I have the following calculation to fulfill the required length of numbers and format, as such

Right ( "00000000"  & (Tax PCB * 100) ; 8 )  - e.g. a number like "00005555"

When I display this in the portal it appears as specified.

However at times "Tax PCB" field is empty and the calculation does not return any numerals. So to ensure I get eight "0"s (00000000) in the portal field I made another field - "C_IRD_PCB Amount_Detail Record Result" which has this calculation :-

If (  IsEmpty ( C_IRD_PCB Amount_Detail Record );  "00000000" ; C_IRD_PCB Amount_Detail Record )

However in the portal this field displays a non empty field as "5555" without the 4 leading zeros. If the field is empty it does display "00000000" correctly.

What is wrong here? Why does the calculation with the leading zeros disappear, part of the calculation still is working the "(Tax PCB * 100)" part, as it removes the 2 decimal places I want it to.

Thank you