Tuto : How to deal with Multicriteria Update and Create

Options

Dear all,

After struggling for some time with the question. I wanted to share the way I managed the issue. Please comment and make suggestion if you have any insights to optimize the solution :)

Using array to manage multi-criteria update and creation of data in XANO

  1. create an array containing the full content of the target table
  2. create an array with the data you need to work with as filter
  3. make 2 variables : IN (data to update) and OUT ( data to create)

as [] Array :Find all Elements

Set filter for OUT and opposite for IN :

4) Create 2 For Each Loop one for IN , one for Out containing your stack if any calculation is required before posting

5)

For the Loop IN

Add Edit record such as your refer to the variable Item to change criteria and to other fields as needed

for the Loop OUT

Add Add record such as your refer to the variable Item to change criteria and to other fields as needed