Jump to content
  • 0

Triggered Action - calculations


sgriesbach

Question

I have a fairly extensive triggered action that recalculates several fields of a table if a record of that table is updated in some way.  Now suppose I need to update my trigger code with a new/updated calculation.  How can I update all the records with the new trigger code?  How do I fire this trigger for all rows of the table?

Aside from the tedious method of making manual updates to individual records, I've tried a couple things:
- reload/import data to the table.  This fails because as I know now, triggers do not fire during import
- do a search and replace on some field of the table that forces the trigger to fire.  This fails with the error message, "too many records for triggered actions to work on"

Thanks for any advice,
Sue

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

hi @sgriesbach from what you describe, I suggest to perform these steps:

  1. BACKUP your table
  2. Put your calculation logic into a manual task
  3. Run this task

Some useful hints could be

  • copy your table into a new one for test
  • duplicate into the test table the fields to be computed (i.e. for field1 make t_field1, ecc.)
  • Make a manual task to copy all values from fieldxx into t_fieldxx
  • Test the task created in previous 2. point on test table
  • Check if fieldxx are changed as you want

If this work for you please mark this answer as "Best answer" on the left and leave a like into the bottom lef heart.... :)

Link to comment
Share on other sites

  • 0

If the trigger that you have updated runs on update, you can do a shortcut by creating an extra field on your table (preferably a checbox) then use a task to update all of the records on that table to have the new checkboxed check. 

You can also just use task to make any update on all of your records. The trigger should cascade during the task run.

Link to comment
Share on other sites

  • 0

Another note for this: 

- do a search and replace some field of the table that forces the trigger to fire.  This fails with the error message, "too many records for triggered actions to work on"

The trigger and task can only process up to 10k records per run, this includes the records processed on the nested triggers.

Link to comment
Share on other sites

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.

Guest
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.

Loading...
×
×
  • Create New...