Are there concurrency issues with 3 a!save() functions within one saveInto?

Have 3 different a!save() function within one saveInto on the submit button. All three os these a!save functions interrogates the save list of values and may add or remove a value. Will i run into concurrency issues by doing this. ie. Will the a!save of each function potentially overwrite the other or are the a!save's perform in sequenece and not in parallel?

OriginalPostID-223534

OriginalPostID-223534

  Discussion posts and replies are publicly visible

Parents
  • From what I can see you're overwriting ri!errors each time, but not accounting for data thats already in the errors array. If you want to keep the existing content in the array you need to append it. Try changing the a!saves to something like this:

    a!save(
    ri!errors,
    if(
    len(ri!surname < 3),
    append(
    ri!errors,
    type!error(
    .....
    )
    ),
    {}
    )
    )

    This will append the new item to the end of the array, while keeping the existing array intact.
Reply
  • From what I can see you're overwriting ri!errors each time, but not accounting for data thats already in the errors array. If you want to keep the existing content in the array you need to append it. Try changing the a!saves to something like this:

    a!save(
    ri!errors,
    if(
    len(ri!surname < 3),
    append(
    ri!errors,
    type!error(
    .....
    )
    ),
    {}
    )
    )

    This will append the new item to the end of the array, while keeping the existing array intact.
Children
No Data