October 23, 201312 yr Forgive the ugliness of this but that is the way it is. The first shot is a calc which works, taken from FMStandards or something. When I want to comment it out so it does not run, it scrambles itself. I copied exactly the three definition values into the three code blocks below. You will see that all I did was put /* at beginning and */ at end. It not only wraps with quotes but removes all my spacing and carriage return which makes reading the calc more difficult. Why does it do this please? Calc working fine Let( [ which = "backward" ; ~CommonHistory = $$BrowserNav.CommonHistory ; ~Window = Get( WindowName ) ; $$BrowserNav.Windows = $$BrowserNav.Windows & If( not PatternCount ( $$BrowserNav.Windows ; ~Window ) ; ~Window & ¶ ) ; ~w = If( ~CommonHistory ; 1 ; Position ( Substitute ( Filter ( Substitute ( ¶& $$BrowserNav.Windows &¶ ; ¶& ~Window &¶ ; "¶•¶" ) ; "•¶" ) ; ¶ ; "|" ) ; "•" ; 1 ; 1 ) - 1 ) ]; Case( which = "forward" ; not GetValue( $$BrowserNav.Layout.Forward[~w] ; 1 ); which = "backward" ; not GetValue( $$BrowserNav.Layout.backward[~w] ; 2 ) ) ) Now I comment it all out and nothing else is touched /*Let( [ which = "backward" ; ~CommonHistory = $$BrowserNav.CommonHistory ; ~Window = Get( WindowName ) ; $$BrowserNav.Windows = $$BrowserNav.Windows & If( not PatternCount ( $$BrowserNav.Windows ; ~Window ) ; ~Window & ¶ ) ; ~w = If( ~CommonHistory ; 1 ; Position ( Substitute ( Filter ( Substitute ( ¶& $$BrowserNav.Windows &¶ ; ¶& ~Window &¶ ; "¶•¶" ) ; "•¶" ) ; ¶ ; "|" ) ; "•" ; 1 ; 1 ) - 1 ) ]; Case( which = "forward" ; not GetValue( $$BrowserNav.Layout.Forward[~w] ; 1 ); which = "backward" ; not GetValue( $$BrowserNav.Layout.backward[~w] ; 2 ) ) )*/ The messed up result after I leave definition box. "/*Let( [¶which = "backward" ;¶~CommonHistory = $$BrowserNav.CommonHistory ; ¶~Window = Get( WindowName ) ;¶$$BrowserNav.Windows = $$BrowserNav.Windows & If( not PatternCount ( $$BrowserNav.Windows ; ~Window ) ; ~Window & ¶ ) ;¶~w = If( ~CommonHistory ; 1 ; Position ( Substitute ( Filter ( Substitute ( ¶& $$BrowserNav.Windows &¶ ; ¶& ~Window &¶ ; "¶•¶" ) ; "•¶" ) ; ¶ ; "|" ) ; "•" ; 1 ; 1 ) - 1 )¶]; ¶¶Case(¶which = "forward" ; not GetValue( $$BrowserNav.Layout.Forward[~w] ; 1 );¶which = "backward" ; not GetValue( $$BrowserNav.Layout.backward[~w] ; 2 )¶)¶)*/" Why won't it allow me to comment it out since I know I do this with other simpler calcs and they work fine when I do this.
October 24, 201312 yr I tried it with 11 Advanced, I can not duplicate the problem. it might help to see whats above it?
October 24, 201312 yr I've seen this when working in the data viewer. Haven't tried it in a field calc. I think FileMaker doesn't like a /* */ comment as the only contents of the calc. One way around it in the DV is to throw in a Null text. Like "" followed by the /**/ comment.
October 30, 201312 yr I've had this before - corrupt script. I think for memory, I just copied all the script steps, deleted the script, created a new script and pasted in the script steps.
Create an account or sign in to comment