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.

Populating fields after calculation

Featured Replies

I have a database with a registers for a tasks (surgical procedures to be performed in a a given date). This registers have a field with the expected duration of the intervention (say 'dur').

When planning the activity of that day, we assign a order number (say 'ord') to every register of that day, and reorder it to obtain the surgical schedule.

I have another field (a global one, say 'interglob') to introduce the time expected to be lost between procedures.

There is another two fields in every register : the beginning time (say 'beg', empty) of each procedure and their end (calculated = 'beg' + 'dur').

I would like to have a script to populate the field 'beg' in this way : register with 'ord' = 1, '8:30' (first procedure of the day). Next register ('ord' = 2) get 'beg' = 'end' of reg. 1 + 'interglob'. Next register ('ord' = 3) get 'beg' = 'end' of reg. 2 + 'interglob', and so on...And, only in the selected searched records.

I hope that you mean you have a related file for each task when you say registers. If so the task should be easy. You script in the first file would be something like this:

Go to related record show only related records

Perform script in related file

Refreash window

The script in the related file would look something like thsi:

Sort by ord

Go to first record

Set StartTime to 8:30 (EndTime is calculated StartTime + Dur)

Loop

Set GlobalStartTime to EndTinme + Interglob

Go to next record exit after last

Set StartTime to GlobalStartTime

End Loop

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.