1 Reply Latest reply on Aug 27, 2014 9:18 PM by philmodjunk

    Using Set Field to update from a Portal

    MichaelHolden

      Title

      Using Set Field to update from a Portal

      Post

           Hello all,

            

           I have a query on how to use the Set Field command to update fields from a Portal.

           For simplicity, I have a solution with 3 tables:

           1. Products

           2. Stocktake Header

           3. Stocktake Details

           The relationship between the tables are as follows:

            

           One Stocktake Header to Many Stocktake Details

           One Product to Many Stocktake Details

            

           The solution is all working okay, except the end users have asked for a new feature, which I'm struggling to provide.

            

           On a layout based on the Stocktake Header table I have a Portal which shows related records from Stocktake Details. From this portal the user adds products and completes a stocktake count.

           Once batch is finished, it's gets processed. What I would like to do at the point of processing batch is:

           1. Update the Quantity counted for each Product in the Portal to a field on the Product Table called 'Last Stocktake Count'

           2. Update the Stocktake Date from the Stocktake Header to a field on the Product Table called 'last Stocktake Date'

            

           I've tried the Set Field command, but that will only update the First Record in the Portal, not all records. 

            

           Is there another way to do this?

        • 1. Re: Using Set Field to update from a Portal
          philmodjunk

               To modify the field for each record in the portal with set field you would need to loop through the portal and use set field once on each portal row. But you might use Go to related records to pull up a found set of portal records on a layout based on the StockTake Details table and then you might use replace field contents to update a field in every record of that found set all in one batch update.