1 2 3 Previous Next 40 Replies Latest reply on Jul 2, 2014 9:42 AM by MichaelShearer

    Layout access at a set time and day

    MichaelShearer

      Title

      Layout access at a set time and day

      Post

           I'm just starting to research this but maybe someone has the answer.

           I want to grant access to a layout on a set day and a set time. Here is what I mean:

           I am getting inputs from people but I don't want anyone to see the inputs until a certain day and time. As an example: There is a cutoff date/time for members to get their picks in. Until the deadline I don't want anyone to see what the other members have picked. Once the deadline is past the entire sheet of picks can be seen by everyone.

           Thanks for any ideas

           Mike

        • 1. Re: Layout access at a set time and day
          philmodjunk

               This does not sound like some to control with layout access but rather record access--where users are not permitted to access any records but their own until A specified date/time is reached.

               Such record specific access control is possible. See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a description of how to set this up.

               And you can also control access to specific layouts if you limit the user's ability to change layouts with scripts and buttons rather than by selecting a layout from the layout drop down. The scripts can compare the current date and time to a date and time stored in your database to determine whether the time has arrived to permit access to a specific layout.

          • 2. Re: Layout access at a set time and day
            MichaelShearer

                 Thx Phil

                 I'll give it a try.

                 Mike

            • 3. Re: Layout access at a set time and day
              MichaelShearer

                   I think I can figure this out but I'm not looking to allow access every few minutes or hours. I want to allow access between Sunday morning at say 9AM and Monday night around 10pm. No access to anyone other than those days and times.

                   Any suggestions.

                   Mike

              • 4. Re: Layout access at a set time and day
                philmodjunk

                     And such should be possible via script, lock expression or both.

                • 5. Re: Layout access at a set time and day
                  MichaelShearer

                       Phil

                       What do you mean "lock expression"? I'm thinking an equation. Have open layout = the date and time and close layout = date and time. Is that do-able?

                  • 6. Re: Layout access at a set time and day
                    philmodjunk

                         Quoted from a previous post here:

                         

                              Such record specific access control is possible. See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a description of how to set this up.

                         The Boolean calculation ( a calculation that evaluates as True or False) that you define in Manage | Security as described in the above mentioned FileMaker Help article is typically referred to as a "lock expression" as it can prevent access to a specific record if the lock expression does not evaluate as True. (numerical values other than zero or "empty" (null) are True. Empty and Null values are False.)

                         I don't really see the point in controlling access to a layout this way, but I'd probably do that with scripting rather than manage security. You can design your database so that the only way you can get to that layout is by clicking a button or selecting from a value list on another layout in order to run a script. The script can check the date and time and show an error message in a custom dialog instead of taking the user to that layout if the date and time is such that they are not permitted access to that layout.

                    • 7. Re: Layout access at a set time and day
                      MichaelShearer

                           Ahh Phil

                           you are getting closer to what I want. I need everyone to be able to make inputs into the layout (SPS) but no access until a set time. I  have used a different layout to allow input. So this keeps everyone from seeing what has been picked by other members. But, I need everyone to be able to print out the pick sheet (SPS) on the day of the games. That is the reason for the need to control layout access.

                           I'll check out what you have mentioned. I haven't used Boolean in FM but I can give it a try.

                           thx

                           Mike

                      • 8. Re: Layout access at a set time and day
                        MichaelShearer

                             I see what you are saying about record access Phil. Your solution may be better.

                             Thx

                             Mike

                        • 9. Re: Layout access at a set time and day
                          MichaelShearer

                               Could this be done by adding a field "day & current time" and a field "set day & time". When they equal it is a true? How would I allow access to view all records at a later time? Say I allow access on Sunday @ 0900 and some one tries to access Monday morning. Would I need to set the day and time to limit access again?

                                

                          • 10. Re: Layout access at a set time and day
                            philmodjunk

                                 It's never been totally clear to me exactly what you are trying to do here.

                                 Get ( CurrentTimeStamp )

                                 Will return the current date and time. I would assume that you want to allow access for a specific time period so you could set values in two timestamp Fields: OpenOn,  CloseOn

                                 And then your lock expression might be:

                                 Let ( Now = Get ( CurrentTimeStamp ) ; OpenOn <  Now And CloseOn > Now )

                                 But I am guessing that you want to set a single time period for access to all records or for a group of records. If so, you can define OpenOn and CloseOn as Global fields. A start up script can load these two fields with values from fields in a single record of another field where the values are entered in non global fields.

                                 And to change the access for your records, you simply edit the dates and times in the two non global fields used to load the global ones when the file opens.

                            • 11. Re: Layout access at a set time and day
                              MichaelShearer

                                   I'll give it a try Phil.

                                   But, another way of explaining it is:

                                   Lets say you and I are guessing a number between 1-10. I input 2 and you input 5. On Tuesday at 9am the winning number is going to be drawn. I go back and change my number to 4 on Monday at 10am. We can't see what numbers we have picked until one hour before the drawing on Tuesday at 9am. So on Tuesday at 8am we can no longer change our numbers and we will see what each of us has picked. The drawing is held and the winner is shown.

                                   I would have a layout for our inputs, without access to each others record, and access not allowed after Tuesday at 8am, and a layout with both of our numbers shown one hour before the drawing. After the drawing the winner is displayed.

                                   I think you have me on the right track.

                                   Thx

                                   Mike

                              • 12. Re: Layout access at a set time and day
                                philmodjunk

                                     And is each guess a different record in the table?

                                     

                                          I go back and change my number to 4 on Monday at 10am.

                                     Is this what you want to allow or what you want to prevent from happening?

                                     We can't see what numbers we have picked until one hour before the drawing on Tuesday at 9am.

                                     Do you mean that you can't see any numbers except the one you picked? That you can't see what numbers other users have picked?

                                     One simple way to manage this process is to set up a layout with global fields for recording the user's guess. When the user accesses this layout, a script can look up their current guess, if any, and copy it to the global field. since global fields are the only fields on this layout, there is no way for a user to see anyone else's data but the data for their current guess as long as they are restricted to that one layout.

                                     A save button then either updates the existing guess record or creates a new one and copies the data from the global fields into the record for that user's guess.

                                • 13. Re: Layout access at a set time and day
                                  MichaelShearer

                                       Well now you have me thinking about global fields.

                                       This is a good idea. The members are actually picking teams they think will win. So I have a layout for making weekly picks. One hour before the games start I want everyone to have a layout to see what everyone picked. Obviously I don't want them to see them until that time. So, the answer is whether or not I want to prevent or allow is yes. I want to prevent access until one hour before and allow it during a set time period.

                                       I am beginning to think I should go back and change the weekly game pick sheet to global fields. I'll do some reading on that.

                                       You have some great ideas.

                                       Thx for the help

                                       Mike

                                  • 14. Re: Layout access at a set time and day
                                    MichaelShearer

                                         Oh Phil

                                         One thing I didn't mention is I have between 50 to 90 members. So I'm thinking the global fields might not work. Not only that they are making 16 guesses a week.

                                         Unless you mean the global fields lookup what they have picked from another field (say game 1 pick). Then when they come back and type in their name it copies from the field game 1 pick to the global field. If they have not yet picked it will be a blank and when they make their pick and hit save it would save to game 1 picks. That should work.

                                         Then I have a layout that has everyone's game one pick. This layout can't be accessed until 1 hour before the game. At that time everyone can print off the sheet with all the picks.

                                         My wife is gone for 5 days so I can get back to work on this.

                                         Thx again for your inputs.

                                         Mike

                                    1 2 3 Previous Next