Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why does commented-out calculation wrap itself in quote?

Featured Replies

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.   

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

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.

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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.