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

Discussion

Discussion

0's dropping from drop down values when Concatenate function is used.

posted on March 3, 2022

Hello,

I have a requirement to concatenate 9 fields to create an Account Code.

Zero's are being dropped.  How can I force them to hold when concatenate?

Thanks!

Sue

 

0 0
replied on March 3, 2022

The form calculation is detecting that it is a number and dropping the leading zeros.  If the codes are always a fixed length, you can use Right in conjunction with Concatenate to add the padding back.

RIGHT(CONCATENATE("00",FundCode), 3)

Now that you have a way to re-pad the values, you Concatenate all the padded codes.

CONCATENATE(RIGHT(CONCATENATE("00",FundCode), 3),RIGHT(CONCATENATE("00",CategoryCode), 3))

Now, you only want it to fill if all the codes have a value

=IF(FundCode<>"",IF(CategoryCode<>"",CONCATENATE(RIGHT(CONCATENATE("00",FundCode), 3),RIGHT(CONCATENATE("00",CategoryCode), 3)),""),"")

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.