
1. Re: Nested Calculations
user19752 Aug 17, 2016 6:05 PM (in response to lindseym)Is there any value other than "TBD" it should be treated as text?
And they should be left aligned in same field?
I couldn't get how the 2nd value become 123, it looks applied 1st case in the calculation...
If there is value like "1234" in Location Calculation, it is one word.

2. Re: Nested Calculations
lindseym Aug 19, 2016 8:03 AM (in response to user19752)I have a calculation set to see "123A" where the dash is considered a space, and I only want the 123.
My main focus is how to get rid of the leading Zeros in column copy side A

If /Copy (Side A) = LOC #
Get 1 left word from location calculation
If 1 left word from location calculation contains leading zeros, remove leading zeros.

Thank you.

3. Re: Nested Calculations
lindseym Aug 19, 2016 8:05 AM (in response to lindseym)Attached is the FMP file and the data cvs to see the true calculations.

data.csv.zip 435 bytes


4. Re: Nested Calculations
user19752 Aug 19, 2016 8:30 AM (in response to lindseym)"remove leading zeros"
This would work on some cases.
Let ( n = text + 0 ; Case ( n = 0 ; text ; n ) )

5. Re: Nested Calculations
lindseym Aug 19, 2016 9:56 AM (in response to user19752)Where would I place that in this calculation? That's the other issue I am having.

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 )]
)
)


6. Re: Nested Calculations
user19752 Aug 21, 2016 11:52 PM (in response to lindseym)1 of 1 people found this helpfulI'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 ]
)
)
)
