Using Set Field to update from a Portal
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:
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?