February 27, 200223 yr Hi guys, here is a good one for you. Can anyone think of a way of writing one script to do the following. Diary system. 7 relationships, 1 for each day. Within each day are time slots 8am-8pm. These are stored in an appointments db, 1 record for each day, with the time slots as fields. Who can think of a way to script this using the minimal amount of scripts. I know I can do it by writing a script for each time slot. Not keen I know I can do it by clicking into the field and then clicking a button. Would prefer the time slot to act as the button. I use this to pick a day from a mini calendar on the side. (you've got to love the new features of 5.5) but who can think of a way of doing this by just clicking on the field, returning that time slot with the relevant day. I know I will need to write the script for each relationship, but at least that is only 7 scripts, not 140 of the darn things. [ February 27, 2002, 07:06 AM: Message edited by: Andy Gaunt ]
February 27, 200223 yr Script what? Get the name of a field when you click it? Status(CurrentFieldName) should do it, but you would have to do one for each field, because Status(...) needs to go to a specified field to return the proper result.
February 27, 200223 yr Author Fitch, oops. I forgot to put that bit in. In the diary I want to be able to click on any appointment and have it show that related appointment. I know I can do this easily if I write one script for each time slot. And I know I can do (Status(CurrentFieldName)if I click in the time slot and then click a button (two steps). But this means 7 buttons for each of the relationships on the screen. This leaves it too open for user error. But can anyone think of a way of doing this with one script for each of the relationships. Basically, have a script that when you click on the time slot, it picks up that time (Status(CurrentFieldName), goes to the relevant appointment and displays it in a pop-up window.
Create an account or sign in to comment