Hi guys,
So i'm trying to work with collections so i can make an offline app. What i am trying to do is to check if a collection item already exists. If it does the quantity needs to be updated. If it doesn't exist it needs to be added to the collection.
Currently i make my collection like this:
Collect(
matList;
{
material: varThisMaterial;
quantity: varAmount;
bonitem: varBonItems;
bonNr: varBonNr
}
)
I would need like a function that does this: if( matlist.material=varThisMaterial && matlist.bonitem=varBonItems && bonNr=varBonNr, update quantity to quantity+varamount, else make a new collection item.
Underneath picture will make u understand what i am trying to do:

As you can see on the picture i have the same items a few times in my collection. I just want them to add up whenever i add more of them.
Greetings Anthony