Skip to main content
ladislavm0002
November 30, 2022
Question

Create a sequence of number based on number of repetition and master contract number

  • November 30, 2022
  • 2 replies
  • 0 views

Hi team, i am trying to to create an expression rule for my application where we have a master contract number (already created) and new child contract numbers will be generated based on the number of repetition defined.

Example:

local!contractmaster="FY2022",          (its given, already created)

local!repetition=4

Result will be saved in SQL DB on Azure cloud as: FY2022_1, FY2022_2,FY2022_3, FY2022_4.

Any help is appreciated. thanks

2 replies

csteward
November 30, 2022

Try this:

a!localVariables(
  local!contractMaster: "FY2022",
  local!repetition: 4,
  
  a!forEach(
    items: 1+enumerate(local!repetition),
    expression: concat(
      local!contractMaster,
      "_",
      fv!item
    )
  )
)

ladislavm0002
November 30, 2022

thanks Chris appreciate your answer, it did work