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.

best practise

Featured Replies

in a found set i want to replace the value of serveral fields with a value tha in in the paramaters ($para1; $para2,$para3,....)

what is considered as best practise (works faster):(

working with a loop function:

loping trough every record in the foundset and replace the value with the

"set field" scriptset example:

Go to Record/Request/Page [First]

Loop

Set Field [Table1::field1; $para1]

Set Field [Table1::field2; $para2]

....

Go to Record/Request/Page [Next]

Exit Loop if [Get (RecordNumber) = value]

End Loop

or with the "replace field script set?

after i have sorted the found record set

example:

Replace Field Contents [No dialog; table1::field1; $para1]

Replace Field Contents [No dialog; table1::field2; $para2]

.....

according my experience the replace field scriptstep takes also a amount of time to be executed

thanks

Freddy

It depends are you in a multi user environment?

  • Author

yes we are

I haven't done much comparisons since FileMaker 5 days, but if you have to do more than 2 fields, the Loop is going to be faster, especially on hosted files. As Stephen was alluding to, they are also safer, because you can optionally trap for errors and capture the IDs of records which were locked by other users editing the fields (though what to do about it is kind of a problem; good reason why mass changes of data on live multi-user files is something to be avoided if possible).

One thing that used to make a big difference in the speed of Loops in List view layouts was to View as Form before the loop began, then return to List view afterwards. It has to do with keeping the scroll bar from having to update. Freeze Window (first) is also a good idea.

But I only do the above View change if there are a lot of records. Otherwise the speed difference is negligible. It seems to me that later versions of FileMaker do Loops faster than they used to.

  • Author

thanks for the great explination,

and yes i gonna to change the layouts in list view, hope it will speed up things

i gonna change also the scripts in loops tommorrow

thanks again

freddy

You just use the View As [ Form/List/Table/Toggle ] script step to change the View temporarily to Form, then run the Loop/End Loop, then change it back to what it was. If you have Freeze Window then the user does not see the change; but apparently FileMaker does, and runs the Loop faster, because it doesn't have to keep updating the scroll bar (which normally moves down the list).

  • Author

so for the good undestanding: it is in FORM view that the results are better, not in ist view?

Yes, because in Form view, FileMaker does not have to update the scroll bar as you move between records, which apparently adds some overhead. You do this switch during the script, before the Loop starts, after a Freeze Window step. Then, after the Loop finishes, you switch back to List view. The actual script step used is: View As, down at the bottom of the Windows section of scripts.

In list view, FMP has to load all of the data for the records that are visible on the screen. This involves working out which records are on screen as well as working out which data is cached and which is on the server... a lot to do, each time the record current record changes.

  • Author

is the number of fields visible on the formview of any importance or just limit the number to the minimum?

is the same happening in case of a search?

for example: what in case of searching a set of records to delete them afterwards pe

best to do the search in form view also?

thanks a again i like it when something is done for a reason, this info is hard to find in books!

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.