Configure a Calculation Procedure for Looping (Managed Package)

For the managed package runtime, make sure that your calculation procedure UI is set up for looping calculations, then configure looping variables.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

  1. From the App Launcher, go to the Vlocity Calculation Procedures tab.
  2. Select your calculation procedure from the list. On the record page, click the Related tab.
  3. Click the name of the Calculation Procedure Version you're using.
  4. Click the gear icon and select Edit Object.

    A new browser tab opens and you are in Setup, in the Object Manager, and on the Vlocity Calculation Procedure Version page.

  5. Select Page Layouts, then select the page layout you're using.
  6. Drag the following items from Fields onto the Vlocity Calculation Procedure Version Detail section:
    • Enable Looping

    • Loop Specification

  7. Click Save.
  8. Return to the browser tab for the Calculation Procedure Version you're using and refresh the browser.
  9. Click the pencil icon for the Enable Looping field and check the Enable Looping box.
  10. In the Loop Specification field, type a JSON value in this format:
    {"loopingStart":"StartVariableName","loopingEnd":"TermVariableName","loopingInterval":"IntervalVariableName"}

    The values must match the names of the variables you will set in the calculation procedure in the next step.

    For example:

    Enable Looping is checked, and Loop Specification is {"loopingStart":"StartVariableName","loopingEnd":"TermVariableName","loopingInterval":"IntervalVariableName"}.
  11. Click Save.
  12. In your calculation procedure, create three variables with a Data Type of Number and a Precision of 0. The names must match the variables you set in the Loop Specification in the previous step.

    For example:

    Term is a Number variable with a Precision of 0.
  13. Click Save Calculation Procedure.

    After looping is configured, you can create calculation steps using the index variable and the PREVIOUS function. See The Looping Feature in Calculation Procedures (Managed Package).