therron36 Posted August 15, 2008 Posted August 15, 2008 Hi once more.. I'm trying to display session times that are available for each day on a calendar in month view. I have an "events" table with the field "available sessions" which is displayed in each day of the calendars month view. "available sessions" is a calc field with the following. Case ( IsEmpty ( Title ) and Time = Time ( 9 ; 0 ; 0 );"9 am" ) ;IsEmpty ( Title ) and Time = Time ( 10 ; 0 ; 0 );"¶""10 am" ;IsEmpty ( Title ) and Time = Time ( 11 ; 0 ; 0 );"¶""11 am" ;IsEmpty ( Title ) and Time = Time ( 13 ; 0 ; 0 );"¶""1 pm" ;IsEmpty ( Title ) and Time = Time ( 14 ; 0 ; 0 );"¶""2 pm" ;IsEmpty ( Title ) and Time = Time ( 15 ; 0 ; 0 );"¶""3 pm") cal is unstored & result is text. so if the 9am & 10am sessions are available for a particular day 9am & 10am will be displayed for that day on the calendar . Can't get this to work. Any advice would be greatly appreciated.
IdealData Posted August 15, 2008 Posted August 15, 2008 The Case() function stops evaluating after the first successful condition is met, so your calc can only ever show one available time slot.
therron36 Posted August 15, 2008 Author Posted August 15, 2008 Hi I must be missing something. Why does this work: "Sessions Available" in the events table: Case ( IsEmpty ( Title ) and Time = Time ( 9 ; 0 ; 0 );1 ;IsEmpty ( Title ) and Time = Time ( 10 ; 0 ; 0 );1 ;IsEmpty ( Title ) and Time = Time ( 11 ; 0 ; 0 );1 ;IsEmpty ( Title ) and Time = Time ( 13 ; 0 ; 0 );1 ;IsEmpty ( Title ) and Time = Time ( 14 ; 0 ; 0 );1 ;IsEmpty ( Title ) and Time = Time ( 15 ; 0 ; 0 );1) "EventsMonth" in the calendar: Sum ( Events_Month::Sessions Available ) The EventsMonth field displays the number of sessions available for those times on that day without a problem.
therron36 Posted August 16, 2008 Author Posted August 16, 2008 O.K. Increase the number of repetitions for the cal field & all works well. Thanks IdealData
Recommended Posts
This topic is 6003 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