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.

Drag & Drop - using info from record you dropped on to?

Featured Replies

I finally got around to implementing drag and drop functionality within our database. I've used this simple technique http://fmforums.com/forum/topic/62097-drag-and-drop/ mainly because it didn't need scripts (and I've looked at other methods and couldn't get my head around it).

What happens is I drag a staff members name onto a shift. This then populates that the shift has been filled by this staff member. It all works perfect. The problem comes into it with our Availability table (shows when staff are available). In the past, when we assigned a shift to a staff member a script would run that would update the Availability table to show they were working.

With the drag and drop method I'm using I can't fire the script because I can't extract the right info from the record that's being dropped on to (the shift).

Does anyone know of a way I can get that info and maybe store it in a global variable or field to use in the script later?

I tried OnModify or the field I was dropping into but that returned the very first record in the database. OnEnter gets me the right info but of course I have to physically click the field for it to fire.

Am I looking at this the wrong way?

I am just considering not bothering to update the Availability table but it does prove useful which means I can't be lazy :laugh:

  • Author

As always, I've decided to go a different way that isn't quite what I wanted but does sorts some of the issues out.

On my list that shows all the staff I have a script that fire OnEnter which puts the staff id into a global variable. Then I have another script, tagged to a button this time, on my shift portal that applies the staff id to it and continues with the script that changes the staff availability.

I'm going to look at highlighting the staff member that's selected and well as doing some research into Halt Script (which I haven't used yet). Mainly so I can tidy the scripts up. There's a bit of "checking" that the script will have to do first like whether a staff member has been selected etc

All and all not a bad comprise but it would be cooler to have drag and drop. So any ideas on my first post I'd be tempted to change my set up.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.