Adobe Campaign: ImportSharedAudience workflow fails with syntax error

Description description


Campaign Classic


In the latest Campaign versions, the ImportSharedAudiences workflow is failing with a syntax error like the one below:

*08/12/2019 20:04:43 jsxListUpdate PGS-220000 PostgreSQL error: ERROR:  syntax error at or near “-” LINE 1: CREATE UNLOGGED TABLE wkf190441_377_-2059232018(                                             *

Resolution resolution

The permanent fix requires an upgrade to 9026 or above. The workaround for versions prior is to update the JavaScript code within the workflow to utilize Math.abs().

Old code:
vars.tableName = NL.SQL.getWorkTableName("wkf", + "_" + task.taskIdentifier + "_" + list.listId;

New code:
vars.tableName = NL.SQL.getWorkTableName("wkf", Math.abs( + "_" + Math.abs(task.taskIdentifier) + "_" + Math.abs(list.listId);