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.

FieldBounds()

Featured Replies

For the life of me, I can find no practical use for FieldBounds().

I thought it might be a hold-over from an old version but it remains in vs. 7.

FieldBounds ( fileName ; layoutName ; fieldName )

Since a field's boundaries never change unless the Developer changes it, we don't need this information. All I can think of is that, if a User is given Design privileges, a script may wish to check it to be sure they didn't move it before continuing a script.

Does anyone have any practical uses for this function? I have been considering this function's purpose for 18 months and can see no way to use it. confused.gif

Maybe you could use a couple of them to build a layout with a lot of fields from external files which have to be in the exact identical position and you don't want to switch all the time using "Object Size"? But I'm not sure, if this is useful

  • Author

But scripts do not run in Layout Mode. If they could, it would be useful.

Which implies it's only informational. And who would care what the dimensions were in Browse mode? As a calculation? I have played with it and it makes no sense to me.

Well,

Say you have a script GoToField[YourField, select] and a layout where (according to your screen resolution or Layout size) this field can be visible only by scrolling.

The GoToField[YourField, select] will force FM to scroll up to the 'YourField', and will stop just there, with the lower part of your window set to the lower pixel of this 'YourField'.

If for some esthetic reasons, you'd prefer your script to scroll down one page or down the Layout rather than stoping just below this 'YourField', then you'd use a script of type :

GoToField[YourField, Select]

If [MiddleWords(FieldBounds(Status(CurrentFileName), Status(CurrentLayoutName), Status(CurrentFieldName));2;1)>gYourLayoutHeight (can be Status(CurrentScreenHeighth)]

Scroll Window (down)**

Else

Scroll Window (up)

** not sure of this script step name

Surely there are better uses of such functions...

My 2 cents.

MoonShadow said:

For the life of me, I can find no practical use for FieldBounds().

Does anyone have any practical uses for this function? I have been considering this function's purpose for 18 months and can see no way to use it. confused.gif

Have you ever tried to maintain a complicated layout? Have you ever had to delete obsolete fields, for instance? Have you ever used Metadata Magic reports? With this function you know where to go on the layout. Sometimes in complicated layouts, especially layered layouts, and object can be hard to find. And how about tool tips? Since this information has to be available so that instant web publishing knows how to draw the layout, then it is also available to us. When some of the layout automation tools start arriving, this information will be of additiional value.
  • Author

Web Companion? That explains it ... never visited that realm yet nor the world of meta-programming. Thanks for the clarification. wink.gif

Hi MoonShadow,

If you have *not* explored the internals of your files, you really should do so. I would recommend you go to FM Files - Developers' Area - Analysis Tools and download some of the utilities available there, including:

MetadataMagic by New Millennium

Analyzer 3.0 By: Waves in Motion

Analyzer Lite By: Waves in Motion

DocuScript 2.0 By: Waves in Motion

Visualizer 1.0 By: Waves in Motion

Brushfire153d_macfull_xAp7 By: Chaparral Software

Viewing your files using one or all of these tools can be a real eye opener.

HTH

Lee

yay.gif

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.