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

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

Recommended Posts

Posted

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!!

Posted

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

Posted

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!

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 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.