Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4099 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.   

Posted

I tried it with 11 Advanced, I can not duplicate the problem. it might help to see whats above it?

Posted

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.

This topic is 4099 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.