lakeside Posted September 24, 2003 Posted September 24, 2003 I have a calendar in which the dates of the days of the week are calculated based on the month and year, which means there are 31 date boxes (date1, date2, date3, etc). So, for instance, if we're in Sept 2003, date9 = 8 (because it's Monday, Sept 8). If we go to Oct 2003, date9 = 6 (Monday, Oct 6). Now I wish to create a script in which a user can click on the date and see a detailed view of events for that date, but how can I determine the date they've clicked on, short of creating 31 scripts? I've tried GetField(Status(CurrentFieldContents)) and similar, so that when they click on date9, it'll get an 8 if we're in Sept and a 6 if we're in Oct, but that doesn't work. Thanks. M.
-Queue- Posted September 24, 2003 Posted September 24, 2003 Why not go to related records based on the date in the field they select? You don't even need to know what it is, just create a calculation date field that uses the selected month, day, and year, and a relationship to itself or the related file (whichever is appropriate). And when the user clicks on a date, activate a script to GTRR [show only related].
lakeside Posted September 24, 2003 Author Posted September 24, 2003 That's what I'm trying to do, but I do need to know the date, and to know the date, I need to know the number in the date9 (for instance) box. I can get the month and year easily enough, but like I say, date9 will be 8 if we're in Septembet and 6 if we're in October, so I need to be able to capture the number in that field to complete the date to GTRR.
-Queue- Posted September 24, 2003 Posted September 24, 2003 Rereading your original post, I'm now more enlightened. GetField requires a field name, so CurrentFieldContents is definitely not going to work, unless there are fields called 1, 2, 3, ... , 31. CurrentFieldName is what you'd want to use. But you need to go to the correct field first, and you can't do that unless you know its name. So, you'll need 31 separate scripts, as you originally surmised.
Ugo DI LUCA Posted September 24, 2003 Posted September 24, 2003 Well, Queue is correct that you can't capture a field name, unless if you entered it priorly. So, the only way AFAIK, which probably won't have the "effect" you wish would be to first go in that field, and then perform a script to set the Status(CurrentFieldName).. Poor solution IMO. See attached. CalendarTest.fp5.zip
Recommended Posts
This topic is 7734 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 accountSign in
Already have an account? Sign in here.
Sign In Now