While updating a table from the process model using WriteToDatastoreEntity node. Even though CDT fields are null, it is updating empty string value in the table. How to update NULL in the table when data is null?
Thanks,
Varsha
Discussion posts and replies are publicly visible
Hi Varsha,
From my experience, Appian will always write a blank value instead of null of data type Text. The workarounds I have used in the past are:
I realize these solutions are less than ideal, and I do wish Appian would treat text fields the same as other data types and retain a NULL value in the database. I am curious if anyone else has come up with a better solution.
Brad
An easy workaround to query entities with empty ( null ) text fields is to use the following query filter:
a!queryFilter( field: "name", operator: "in", value: {"", null} )
Thanks Philip. For some reason this didn't work for me when comparing to null, but it pointed me in the right direction. I ended up using the "queryLogicalExpression" function to do something like this:
a!queryLogicalExpression( operator: "OR", filters: { a!queryFilter( field: "name", operator: "is null" ), a!queryFilter( field: "name", operator: "in", value: {""} ) } )