I have a subprocess that loops the returned records from an API call and adds a new record in a data object. I want to modify the process to check if the record already exists and if so, modify the existing record with the data changes.
First read the record using whatever Identifier you have on it from the source data. If the record exists the Id value will be a Guid and if it doesn't exist the Id of the record will be Guid.Empty.
So the condition for the update will look like:
[Id from the Read] != Guid.Empty (this means the Read found the record)
The "else" will proceed to the Add, just make sure you populate some identifying value from the API call that you'll use when you read if the record exists next time.
How do you use the Modify data action to set a String field to null or empty string? I've tried entering "" and String.Empty in the Notes formula and neither worked.
To do that you need to specify "String.Empty" value for this string as a formula in "Modify data" element (like on the screenshot http://prntscr.com/nfh32l).
The only thing that I've found that works is creating a dummy String Parameter that has nothing in it, i.e., Blank Text, then setting the Modify data field that I want to be empty to the dummy parameter.
Please email us to support@bpmonline.com and provide us with the link to the application and with the name of the section where you try to implement this logic and we will take a look closer. We can't reproduce this behavior on our side so we need to see the field you are trying to change and the process that was created on your side that should change this field.