3 Replies Latest reply on May 26, 2009 7:58 AM by Orlando

    adding a record to a portal



      adding a record to a portal


      Hi group


      I am trying to add records to a portal that is displaying data from another related table but I can't seem to work out how, can this only be done through a script?

      I can add a button to delete a record in the portal but not add?


      Thanks Fluffy

        • 1. Re: adding a record to a portal

          Hi Fluffy


          You can use a script or if you want to do it directly on the portal then you need to modify a setting in the relationship for this portal.


          Go into the Relationship Graph and double click on the join between your two tables and the Edit Relationship dialog will appear, towards the bottom of the dialog there are three options for each side of the relationship, you just need to tick the option for "Allow creation of records in this table via this relationship".


          Click OK and get back to your layout and there will be a blank row after the lat record in the portal, clicking into one of the fields and inputting a value will create a related record.


          I hope this helps.

          • 2. Re: adding a record to a portal

            Hi Orlando


            Thanks for your reply, I found the "Allow creation of records in this table via this relationship" after I placed this post, but I really wanted to control it with a button so when the button is clicked it would add a new record to the portal linked database/tables.

             I also wanted another button that would set one of the related records in the list to the top of the list as the primary record for that link.


            What I want to do is have control of the related records in the portal as if I am in the origonal layout screen.


            thanks Fluffy

            • 3. Re: adding a record to a portal

              Sounds like you want to use a script to create the record, you can setup the script to go to the appropriate layout, create the record and set the appropriate values, then come back to the layout you started on with the portal and the new record created, the user will not realism they have moved.


              Or script it to go to the last row, if you set allow creation, and populate a field to create a record. The first option would mean you do not need to have the creation option switched on.


              As for your second question, you just need a flag field, number would be best, that you sort the portal by, descending, and if you want the record to be at the top then you place a 1 in the field and it will shoot to the top. You will need to put in some extra steps to clear out any other records that may have a 1 in already.


              If you want me to go into further detail on any of the above then let me know.