Skip to main content
July 9, 2021
Question

repeating the add loop

  • July 9, 2021
  • 2 replies
  • 0 views

in my application, I am repeating the interface by clicking on the add list button, In the process model, I want to repeat the audit fields. the length should be equal to the length of the loop, can you guys help me how to use a repeat function to satisfy the loop

    2 replies

    stefanhelzle0001
    Brainy
    July 9, 2021

    We need way more details to be able to support. And it is not really clear to me what you want to achieve.

    codeblog.jonskeet.uk/.../

    davel001150
    July 13, 2021

    If you're in an Interface, process variables don't come into the equation right away.  You're still dealing with rule inputs or local variables.  Now, when you click the button, you can use the append() function to add a new item (such as your "audit fields" which I assume to be a CDT) onto the end of a list.  You have to have saved the CDT list as a list.

    Now, however long your list grows, by clicking the button inside the Interface, the whole list and all it's items will be converted to a PV when you submit the user input task, provided you save it to a rule input and configured the inputs and outputs correctly.  If the ri! is multiple, the ac! is multiple, and the pv! is multiple, it will get 1 item or 20 items or 253 items without any additional effort.