4 Replies Latest reply on Jun 2, 2015 3:31 PM by philmodjunk

    Portal Issue - Not a found set



      Portal Issue - Not a found set


      I'm writing a script to loop through a portal to use the record information for other actions. I'd like to make sure I have a found set to work with to insure that the correct number of records are used. 


      In my script I'm using the portal relationship field to do a find to establish a found set and that's where I stopped.  I don't want to go to another layout and come back to the original, If possible I'd like to complete all actions with one layout before moving on to another.  so I searching for the good scripting methods


      The attached screen shoot is of the layout (Layout B) described above.



      Layout A: Orders-----orderID---<LineItems

      Layout B: LineItems-----(uniqueID)----<Confirmed



        • 1. Re: Portal Issue - Not a found set

          Yes but your first thought may be the best.  In this type of scenario, I would freeze window, go to related records layout in new window, which btw, only has to be a blank layout with the required fields (maybe), loop thru records, close window.  Usually for a few records, plus the freeze window step, the user wont even know they left.  You can even set the windows top and left dimension to -1000 and the layout would never been seen. 

          And don't forget to add the script step Allow User Abort and set it to Off

          • 2. Re: Portal Issue - Not a found set

            And you usually do not need to freeze the window or open a new window--though there are cases where that is the better option. It's pretty common to change layouts and pull up related data, process it and then change layouts back. There CAN be issues with that, but they are usually manageable.

            It's also possible to loop through the portal rows as a way to work with the data, but I generally consider that to be second best as this makes your script rather fragile as a number of layout changes can affect how such a script works.

            • 3. Re: Portal Issue - Not a found set

              My script is partially working, I decided to use a Global field, Set Field to the global, go to another layout and preform the find which provides the found set I'm looking for.  Next I need to check the status of 2 different fields in each record and based on the status preform a set field.  I used an "If, Else" after the perform find;

              Perform Find [] 

              If [A = "yes" and B = "No"]

              Set Field []


              Show Custom Dialog []

              I've tested the script was 2 updated records that meet the criteria, set field is bypassed and Show Customer Dialog is displayed.  Question; If the target fields are in another table do I need scripting to create a new record before the fields can be set?


              • 4. Re: Portal Issue - Not a found set

                If the fields are not global fields, you not only need a record in your found set, but a relationship that links back to the correct record in the other table.