6 Replies Latest reply on Jul 7, 2009 8:01 AM by QueryJoel

    Presets for Portal



      Presets for Portal


      Hi, if I've a portal setup and one of its column pertains to Category... I would like to know how do I insert text (preset name of each item) into each portal row?









      Your help in this query of mine will be greatly appreciated.  Many thanks and warm regards,


        • 1. Re: Presets for Portal
             To be more specific... as in automate the listing presets every time a new record is created.
          • 2. Re: Presets for Portal

            The way is to create 4 child records when a new record is created using a scripted process. But one may ask why...


            New Record

            Set Variable [ $parentID; pkParentID ]
            Go to Layout [ Child ]

            New Record

            Set Field [ Child::fkParentID; $parentID ]

            Set Field [ Child::Category; "Tools" ]

            Duplicate Record

            Set Field [ Child::Category; "Liquids" ]

            Duplicate Record

            Set Field [ Child::Category; "Disposables" ]

            Duplicate Record

            Set Field [ Child::Category; "Misc." ]

            Go to Layout [ Original ]




            • 3. Re: Presets for Portal

              Many thanks, mr_vodka for such a prompt reply...  Am not really a programmer hence it takes me a while to figure out what you 've written.  Is setting field after duplicating the same as Go to Portal Row [Next] and then Insert Text using a scripted process?


              I tried the Go to Portal Row and inserting Text method,.. and i ended up having to click the button to activate the script 4 times before all 4 portal rows are filled accordingly... i wonder why and how can i work round this? 

              • 4. Re: Presets for Portal

                This sounds like something I do with an invoicing database I maintain. We "pre load" the invoice with 4 specific items as those 4 items cover 90% of the business transactions and it enables our people to more quickly serve customers.


                I use the following script outline:


                Freeze Window

                Set Field[gItemKey; 1]


                  Go to Portal Row [Last]

                  Set Field [PortalField; ItembyKey::ItemName]

                  Set Field [gItemKey; gItemKey + 1]

                  Exit Loop If [IsEmpty(ItembyKey::ItemName)]

                End Loop


                The items to be loaded in the tag are recorded in a table referred to by the ItembyKey table occurrence which is defined as:



                gItemKey is a global number field and ItemNumber is a number field in the table that incidentally specifies the order of that the items will appear in on the invoice.


                The portal relationship has to be defined to allow creation of related records.


                This approach works well as users can change the items to be pre-listed on the invoice simply by editing a table instead of having to modify the script each time.


                • 5. Re: Presets for Portal
                     Thanks PhilModJunk... sounds like a solution of a case close to mine... will give it a try in the morning and hope it works!  *fingers crossed* thanks once again and will post again on the result  :)
                  • 6. Re: Presets for Portal
                       Thanks PhilModJunk... It finally works!  And thanks mrvodka for your help too...  :)