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.

Newbie Help with simple automating script

Featured Replies

Is there an easy way to automatically fill a field with a different field from the previous record? This seemed easy to me, but I am new to this application and have had alot of difficulty figuring out the proper script steps.

In my example, each record has a field "Starting Meter" and "Ending Meter". When a user selects the script, the script should pull the "Ending Meter" field from the previous record, and insert it in the "Starting Meter" field of the current record.

I wrote it <unsuccessfully> as:

Set Field ["Starting Meter"]

Go to Record/Request [Previous]

Go to Field [select/Perform,"Ending Meter"]

Insert from Last Record [select, "Start 5090 Meter"]

Exit Script

I would appreciate any advice on this.

Matt

Insert from Last Record could be used if you were setting Ending Meter on the current record, but only on that field.

It is a better idea anyway to use a global field to transfer the data between records.

Go to Record/Request/Page [Previous]

Set Field [global, Ending Meter]

Go to Record/Request/Page [Next]

Set Field [starting Meter, global]

You may want to include a Show All Records step before going to the previous record, if there is a chance that the current found set does not contain the desired 'previous' record.

  • Author

thanks. it worked and i learned something.

Well I came up with a little naugty recursion, which isn't endorsed by FM Inc. Since it's likely to blow the stack, but this one is pretty harmless, since it only have two loopings - My goal was to avoid a "littering" the base with yet another global:

If [ IsEmpty ( Get ( ScriptParameter ) ) ]

Go to Record/Request/Page [ Previuos ]

Perform Script [ "New Script"; Parameter: Untitled::Field1 ]

Else

Go to Record/Request/Page [ Next ]

Set Field [ Untitled::Field2; Get ( ScriptParameter ) ]

End If

Unfortunately are you on the previous version so scriptparameters are not possibel.

--sd

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.