AliB Posted November 14, 2007 Posted November 14, 2007 Hi there – hoping someone can clarify this for me...... I'm working on some layouts for a scheduling solution. The desired end result is a looping 'one-week-per-page' view of staff member's diary entries. Having created the basic database, I created a script called "autoview" along these lines: 1. Set viewerStartDate to Monday of week 1 //calculated from today's date 2. Pause script for n seconds 3. Set viewerStartDate to Monday of week 2 //adds 7 – forces viewer to update and show next weeks entries 4. Pause script for n seconds 5. Run script "autoview" 6. Exit script My intention was that step 5 would basically run the script again, with step 6 exiting the currently running script. It seems to work fine – but am I doing something daft here? Is there a way to do the same thing but not 'lock out' data entry? This script basically puts the 'resume' or 'cancel' dialog permanently in the sidebar – ideally, I want to be able to update the diary entry data at the same time. I'd appreciate some advice on this one!!
FestiveEmbalmer Posted November 14, 2007 Posted November 14, 2007 I'm not entirely sure I understand what you are trying to do. It seems to me that if you are trying to view records from a specific time period it would be done better through a relationship than through a script. You could have a portal filtered by two globals representing a start date and end date. You could have a multipredicate "EntryDate >/= gStartDate" AND Entry Date = gEndDate" Changing the globals would filter the diary entries. You could also edit the entries from the portal. Then if you wanted to automate the view change the script would just change the globals to the beginning of the desired week. hope that's helpful, matthew
AliB Posted November 14, 2007 Author Posted November 14, 2007 Thanks – and yes, that's what I'm doing. The script basically sets the startDate in the global field, and then waits a bit before setting it to the date one week forward...... My concern is that I should be executing the same script from within itself...... I wondered if this was bad practice, or there was another solution!
Recommended Posts
This topic is 6220 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