1 Reply Latest reply on Dec 10, 2012 10:36 AM by philmodjunk

    Using Portals and User Priviledge

    ienalpe28

      Title

      Using Portals and User Priviledge

      Post

           Hi Im having an issue in using portals How can I put the entry field in the portal always at the top of the portal? So when user add a new record the entry field will always be at the top so that when the portal gets longer user wont have to scroll down to the bottom to enter a record. Help please. Any techniques is welcome.

           (followup question)

           I have a portal which has the action table that contains: 1. Action 2. AccountCreate 3. TimestampCreate. its like a note.

           user will enter a note in action field and after commiting, user account name will be displayed in AccountCreate and timestamp will be in TimestampCreate automatically. So I have multiple user. How can I restrict other user from not editing the notes that they did not create. user1 cant edit or change the notes of user 2. and then displays a message showing that they are not allowed to edit other users notes.

        • 1. Re: Using Portals and User Priviledge
          philmodjunk

               First Question:

               Go to Manage | Database | Relationships and find the relationship used for this portal.

               Double click the relationship line and clear the "Allow creation of records..." option. When you use this option, the "add" row in the portal is always at the bottom.

               In either the relationship or in portal set up, specify a sort order that would put a newly created record at the top of the portal. Sorting by Timestamp or serial number field in descending order are two possible sort orders you might use.

               Put a button on your layout to start a new record in the portal. Give it a script similar to this:

               Set variable [$ID ; Yourtable::PrimaryKey ]
               Freeze Window
               Go to Layout [PortalTable]
               New Record/Request
               Set Field [Portaltable::ForeignKey ; $ID]
               Go To Layout [original layout]

               Clicking this button should cause a new, blank record to appear in the top of your portal.

               Second question, you can use custom access privileges to deny a user edit access to a table unless the record has their account name in the account name field. 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 more on how to set this up.