Rerun workflow on everything from workflow log

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jakub Grufik
    Senior Member
    • Aug 2022
    • 361

    Rerun workflow on everything from workflow log

    Hello guys, I accidentally made a mistake and recalculated one field (dateStart) in our entity via Scheduled workflow targeting the report result.

    The thing is that I have added 14 days to dateStart but I did not add 14 days to dateEnd so now the dateEnd is earlier than dateStart and the duration is 0 days.

    I would love to know if there is a way how to rerun the workflow so it targets all the records it changed before (everything is stored in the logs of the workflow).

    If not, is there a way to use a report where the filter is something like dateEnd < dateStart and then run the workflow on this report?


    Thanks a lot for the help.

  • victor
    Active Community Member
    • Aug 2022
    • 727

    #2
    If you did not make changes to these records after the workflow worked, then they all have approximately the same value in the modifiedAt field.
    - Based on this field, make a report, check if there are no extra records. If so, add the dateStart -> changed filter to the report. If your workflow changed something else, then changes in these fields should also be made in the filters of your report.
    - Include this report in a new workflow, which will change the Action dateEnd.​

    Comment


    • Jakub Grufik
      Jakub Grufik commented
      Editing a comment
      not possible because I have already recalculated formula for all of those afterwards thanks a lot for the tip anyway.
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    #3
    Create a report with the condition to retrieve the records that their dateEnd < dateStart or use Expression to query the exact difference between the two dates and then feed the report to a scheduled workflow to update the dateEnd, see screenshot for the report condition.

    This is one way to sort this out.

    Hope this helps mate
    Attached Files
    Rabii
    Web Dev

    Comment

Working...