Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


This topic is 4686 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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:

Posted

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.

This topic is 4686 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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