Hi Guys,
I am looking for pointers on how to do something. I have an empty database with fields SKU & QTY.
I need to know how to add a record to the database if it doesnt exist, but once it exists I want to update the QTY so if someone puts SKU=abc, QTY=10 it would write that information to the database, if they then did SKU=abc, QTY=5, the result in the database would be SKU=abc, QTY=15.
Just not sure how to determine if I need to ADD or UPDATE
I’ve had bugs before where certain workflows were running too fast and it would skip certain conditional statements or ignore them. If you run two different workflows, put them into one folder, it won’t be cluttered.
Two different workflows are also easier to maintain when you need to make changes to the flow and actions following that particular workfow.
This is true, I have experienced odd things happening on data intense workflows, usually if I have more than 10 fields to update I separate the workflows to be sure the correct thing happens as it should.
So separating the workflows with conditions is definitely the route to go
So am I correct in thinking that it accesses the database twice.
1st Pass the record isnt there so it adds it, but on the 2nd pass it is there so it updates it. If I have the “right end of the stick”, wouldnt it be better trying the update first then the create