Manage custom rules when deleting forms and questions

Follow these guidelines to ensure custom JavaScript rules remain valid and functional when copying or deleting forms and questions.

Note:

When you delete a form or question, you must also review any associated custom JavaScript rules together with your rule designer. Rules are not removed automatically. Instead, they remain in the system and can get a status of Invalid. Invalid rules don't run, but they continue to appear on the Rule Management page and the Rules report.

Deleting a form or question is considered a Study Version change. Subjects in earlier versions of the study may still have that form and therefore may still require these custom JavaScript rules.

If you copied a form from another study and then deleted it before publishing, the copied rules also remain in the application. In this case, you must review them and determine whether you should delete or disable the rules manually.

  1. Open the Rule Management page or run the Rules report.
  2. Identify rules that reference the form or question you plan to delete, together with your rule designer.
  3. Coordinate with your rule designer to determine whether to do the following:
    • If the rule is still needed for earlier study versions, update it to run only where appropriate by using the
      isStudyVersion()
      helper function. See isStudyVersion (Control).
    • If the rule is no longer needed and the form wasn't deleted yet, delete the rule directly from the subject forms in Testing mode.
    • If the form was deleted after publishing it in Testing mode, disable the rule on the Rule Management page.

Note:

Why is this important?
  • Invalid rules don't run, but they can clutter the Rule Management page and the Rules report.
  • Failing to review custom JavaScript rules when copying or deleting forms may leave invalid rules in your study, which can require manual clean-up by Oracle Support.
  • Properly managing custom JavaScript rules ensures that only the correct study versions run the rules they need.