Hello,

I have a current calculation that works great. This issue is I became aware of a situation that now needs to be factored in.

Currently here is what happens.

I want the leading 000 to be removed from the copy (side a) if they are present.

I think a "getasnumber" parameter would work, but I am a little confused how / where to add it. So it only evaluates for leading zeros if Copy (Side A) = LOC # and Location Calculation has leading zeros. There are times there will be 2 leading zeros or maybe 5, definitely not consistent.

Here is my current Case calculation:

-------------------

Case (

${Copy (Side A)} = "LOC #" ;

Substitute ( LeftWords ( Location Calculation ; 1 ) ; "TBD" ; TextStyleAdd ( "TBD" ; HighlightYellow ) );

Substitute (

${Copy (Side A)} ;

["TBD" ; TextStyleAdd ( "TBD" ; HighlightYellow )];

["LOC #" ; LeftWords ( Location Calculation ; 1 )]

)

)

--------------------

Thank you.

I'm not sure how to change the current calculation, since your example provides only first case of

${Copy (Side A)} = "LOC #"

Let ( [

text = LeftWords ( Location Calculation ; 1 ) ;

n = text + 0 ;

text = Case ( n = 0 ; text ; n )

] ;

Case (

${Copy (Side A)} = "LOC #" ;

Substitute ( text ;

"TBD" ; TextStyleAdd ( "TBD" ; HighlightYellow ) );

Substitute (

${Copy (Side A)} ;

["TBD" ; TextStyleAdd ( "TBD" ; HighlightYellow )];

["LOC #" ; text ]

)

)

)