Charity Posted October 23, 2013 Posted October 23, 2013 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.
No_access Posted October 24, 2013 Posted October 24, 2013 I tried it with 11 Advanced, I can not duplicate the problem. it might help to see whats above it?
David Jondreau Posted October 24, 2013 Posted October 24, 2013 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.
truelifeajf Posted October 30, 2013 Posted October 30, 2013 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now