Where will you put the dates "7/7/2014" and "7/9/2014"? Will they be dates in fields in your database? Will they ever need to change?
If [ Get ( CurrentDate ) > GetAsDate ( "7/9/2014" ) ]
Go to Layout ["Layout 1" ( ) ]
Else IF [ Get ( CurrentDate ) > GetAsDate ( "7/7/2014" ) ]
Go to Layout [ "Layout 2" ( _ ]
is one possibility, but you might also need to use a date field to hold the dates:
If [ Get ( CurrentDate ) > Globals::gDate2 ]
I never give you the whole story. Sorry, 'bout that Chief.
Yes I am using a date field. Each week I use two dates. One is for games on Thur. and the second is for the Sun. games. I have a layout that just shows early games and one that shows the rest. I know you had said something about displaying field contents at specified times. That would be the idea setup. Any suggestions on where I can find info on that? So if someone logs on and goes to the SPS on Thur. they will only see the one pick. Then when they go to the layout on Sunday they will see them all. I didn't go to giving 17 records to each member like you suggested.
One other question. I want the records to update picks for each member at a set time and date. What could I use as a trigger? Could a date be a trigger? That way it would do the update at one time and not again until the next date comes up. Right now if I use an event like a layout opening it does the update each time it is opened. Not a big deal but I thought it would be neat if I can do it with the date.
Why wouldn't the same layout show data for Thursday games or Sunday games, but with a script that controls which are visible by finding different groups of records? Why would you need two layouts?
So you are saying have multiple records per person. I usually have 70-90 people in the club. Right now I have it so any picks they make are held in a layout. On the day I update the records it copies them and pastes them in the Season Pick Sheet for that week and into a master SPS that does all the calculations. I think if I have a record for each week (17) and another record for early games and one for Sunday games it would get to be too much.
I have setup two spread sheets. One with early picks and one with all picks. I'll have the button use the script you sent me.
As for the updating date function I guess I'll just use opening the layout as a trigger.
Am I wrong about the multi record thing. I'm thinking 70 members times 2 different pick dates times 17 weeks.
There is more to this then I thought.
PS Thank goodness I have FM. Writing code would be really deep.
Good point about using one layout to display them all. I could have it do the update and that would control what they see.
I'll give it a try
So you are saying have multiple records per person.
Often, a relational database design requires both a single record for each person and also multiple records for data linked to that one person. Thus, you end up with one table where you have a record for each member of your club and a related table where each "pick" is a different record linked to one of those records in the member table.
Members::__pkMemberID = Picks::_fkMemberID
For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained