Jump 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.

Featured Replies

  • Newbies

Hi,

 

So I got a script that shows a custom dialog to change the layout and remove the subsummary so that the DATA shown on LIST view would be sorted by the column header. My question is in that how can I add to the script so that the custom dialog would only appear under one circumstance: and that is, when the subsummary is shown (ie: when the database is sorted by the subsummary, the dialog shows; but when it isn't it just automatically sorts the list descending/ascending. 

 

In addition, I'm trying to use a global variable to capture the state of the subsummary report... suggestion on how to do this? 

 

I've attached a picture of my script to this post for further analysis. 

 

Input greatly appreciated. 

post-107701-0-61987000-1352915934_thumb.

Get(SortState) will tell you if your records are sorted or not, but it won't give you the details. There's no way to get that information after the fact. Which is pretty dumb, since FileMaker obviously does know what sort was just done -- you can see it if you hit ctrl-S again after you sort.

So, you'll need to script your sorts, and in the sort script, set a global variable -- e.g., $$this -- to the name of your sort field. You can then refer to that variable in other scripts and branch them accordingly.

  • Author
  • Newbies

Hi Fitch, 

 

So I set the global variable as $$IsSubSummary to indicate when the list is sorted under subsummary... and I tried to make it so that the dialog would appear only when it's sorted by subsummary. However, it's now currently skipping the dialog step within the script altogether. Do you have any suggestions as to why this is occurring?

 

I realized that the $$IsSubsummary goes from 1 to 0 using data viewer (in my second screenshot) after I hit the first If function.

post-107701-0-54523300-1353007233_thumb.

post-107701-0-04046800-1353007240_thumb.

You're testing for

$fieldname = TypeName_s

... and then you're testing for

$fieldname = TypeName // with no "_s"

They can't both be true.

Create an account or sign in to comment

Important Information

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

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.