Jump to content
  • 0

Trigger - On INSERT LOOP through another table



Assume following Table schema:





My desired work flow

  1. Insert a date record into tbl_Inventory Count_Dates 
  2. On INSERT, tigger the following:
  3. Loop through tbl_Inventory_Items - a list of each item to be counted - and insert a copy of each item into tbl_Inventory_Count_Detail, along with default value of 0 for Count of each record.  This results in a record including new id, Count_Date(which triggered the event), Material_id, Material_Name, and Count (Set to 0).
  4. The purpose of this is to be able to filter tbl_Inventory_Count_Detail by Count_Date and use as a data source/view for a Tabular report datapage that allows user to enter a dated physical count for each item.

@CraigSZ - I think this is similar to the direction you suggested in earlier post.

Hoping I can do this all with a looping triggered action - Just not sure on Syntax.  Any help would be greatly appreciated...Thx...



Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...