You are viewing limited content. For full access, please sign in.

Question

Question

Forms calculation is dropping leading 0

asked on September 9, 2024 Show version history

I am using a formula under Advanced - Calculation on a Single Line field to pull in data from another field. Both fields are Single Line text fields, however it is dropping the leading 0 when it loads the text. Here is my formula. Any ideas what I am doing wrong?

=IF(OR(ID1='General',ID1='General2'),'TO_TEXT(main_Table.Acct1)','')

01 is entered in recallAcct, but 1 is returned to the field Acct2. 

 

Thank You,

 

0 0

Replies

replied on April 8

Hi, this issue has been fixed on Forms 12 Spring 2025 Release: The single line field does not automatically have leading zeros dropped.. (BugID: 542915)

You can see other changes from: Laserfiche 12 Release Information

Get the latest Laserfiche Forms 12 package from: Laserfiche 12 - Downloads

1 0
replied on September 10, 2024

I'm going to guess that Acc2 is a number field.  Those always drop leading zeros. 

0 0
replied on September 10, 2024

Hi Genny, that was the first thing I checked. It is a single line field. That is why I don't understand why it is dropping the 0.

Thank You,

1 0
replied on September 10, 2024

I have not used TO_TEXT() before so maybe that is where it's removing the leading zero. 

 

Have you tried:

=IF(OR(ID1='General',ID1='General2'), main_Table.Acct1,'')

1 0
replied on September 10, 2024

Yes, I tried that first and it did the same thing. I thought the TO_TEXT() might make it work. No luck... I am going to try opening a ticket to support. I am not sure what I am doing wrong. Thanks for the help! I let you know what I find out. 

1 0
replied on September 10, 2024

Sorry I was not able to help, I hope they can! 

0 0
replied on September 11, 2024

Thanks again for your help Genny,

 

I wanted to give an update. Laserfiche put in a bug report for the issue. It seems like the issue only occurs if the source field is in a table in the modern designer. 

I did some more testing and came up with the following formula as a workaround for now. It seems to be working.

 

=IF(LEN(TEXT(main_Table.Acct1))=2,main_Table.Acct1,CONCATENATE(0,main_Table.Acct1))

 

Thanks,

1 0
replied on September 11, 2024

Thanks for giving me an update! Now I know to watch out for the issue! 

0 0
replied on September 10, 2024

I have not used TO_TEXT() before so maybe that is where it's removing the leading zero. 

 

Have you tried:

=IF(OR(ID1='General',ID1='General2'), main_Table.Acct1,'')

You are not allowed to follow up in this post.

Sign in to reply to this post.