whitehouse Posted August 25, 2004 Posted August 25, 2004 Hi, I am having problems figuring out a solution to this. I have an event database where some events have the same date. I would like to find a way to take my non-available dates, run a script, and have it set a checkbox I have labelled "available" to true on only the available dates. Sorry if this sounds confusing, as I'm a bit confused myself at the moment. I can add the dates that I am not available to the database by creating a new record for each. I've tried a few different ways to grab a hold of this problem, but it keeps slipping away from me.
-Queue- Posted August 25, 2004 Posted August 25, 2004 What is your critieria for determining a non-available date? How many events can be scheduled for a single date before you are not available?
whitehouse Posted August 25, 2004 Author Posted August 25, 2004 basically at this stage of the database, I will create a new record and put the non-available date in the date field. Then, for event name put something like "Not Available" This will be done manually for now. i dont want to limit the events scheduled to a single available date at this time. to clear things up, the event database is actually a Db of events that I am bidding on. so, if 3 events have the same date, i still want them to be checked as available so i can put in a bid. however, I need a way of filtering out the events on dates I am already busy, or booked.
-Queue- Posted August 25, 2004 Posted August 25, 2004 Attached is one way you could do this. It uses a value list calculation to determine what is not available. Once you enter a new Not Available event or change a Not Available to something else, click the Refresh button to refresh the screen and show the other records correctly. Otherwise, no scripting is necessary. Events.zip
whitehouse Posted August 26, 2004 Author Posted August 26, 2004 Wow, more than I was expecting Queue, Thanks. However, to further my quest for knowledge, I was hoping you or someone else could explain a little bit about how data is passed in this solution. I see you setup a cNotAvailable, and a cAvailable field. On the cAvailable field, I see your using patternCount to put items in the value list you setup, could you explain what pattern count does, and the syntax you used? I also dont understand the need for cNotAvailable. Also why was the relationship used? and I dont understand how refreshing the screen tells the one value list to be set to "1" sorry for all of the questions. I guess I know just enough scripting to make me dangerous at this point.
-Queue- Posted August 26, 2004 Posted August 26, 2004 CNotAvailable is simply an auto-entered text field with the value "Not Available". It is related via the NotAvailable relationship to the Event field. This means that it is related to each record that has "Not Available" as its event name. So, if you put a portal on the layout that uses the NotAvailable relationship, and put the date field in that portal, you would only see the dates in the portal for records that were named "Not Available". In the example, you would see 6/6/2004 and 8/6/2004. The NotAvailable value list uses these dates to create a list of unavailable dates. cAvailable then tests whether the current record's date appears within the list. The ValueListItems function returns a carriage-return delimited list of the specified value list. E.g. 6/6/2004
whitehouse Posted August 27, 2004 Author Posted August 27, 2004 Queue, Many thanks. After reading your descriptioon and playing with the sample, I was not only able to understand this method, but apply it to my existing database.
Recommended Posts
This topic is 7396 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