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.

Like 0

Like

1 comments

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.

Ryan

Show all comments

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.

Like 0

Like

5 comments

Dear Janine,

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).

Best regards,

Oscar

I did that and it ignored it, like "".

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.

Janine White,

I personaly tested "String.Empty" formula value and it removed the value of the string field to an empty value and it should work on your side either.

As for paramter set for the string field as an empty text parameter - it also works and you can also use this parameter if needed.

Best regards,

Oscar 

Oscar Dylan,

When I put String.Empty, not in quotes, in the formula, it displayed "String.Empty", not an empty string, for the field.

Janine White,

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.

Best regards,

Oscar

Show all comments