AnsweredAssumed Answered

Calculation - Nesting Statements

Question asked by lindseym on Nov 17, 2016
Latest reply on Nov 18, 2016 by philmodjunk

I have this calculation:

 

Let ( [

  text = (Right ( Building ; 1 )) & "-" & (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 ]

  )

)

)

 

 

 

 

I think the issue is with (Right ( Building ; 1 )) &

 

portion.

I manage to get the - and the copy

 

 

 

Screen Shot 2016-11-17 at 2.42.31 PM.png

 

 

I want it to take the  Building  Column and only parse the building letter (always the second character) add a single dash and the take the {Copy (Side A)} contents (which is a calculation).

 

The building Letter and Copy Column is my s practice column.

 

The  column in the above should read

 

G-117

B-117

C-117

 

Am I just leaving out brackets or something?

 

Thanks,

 

-L

Outcomes