Values from Workflow Data Fabric table not being returned in Reference variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago - last edited a week ago
I am having an issue returning values from a Workflow Data Fabric table using an Advanced reference qualifier on a variable. I have a variable [Orders] that references a Workflow Data Fabric table and I have created a script include that I'm calling in the Reference qualifier field. I'm passing the value from another variable [Account] into the script include to return the correct data.
When returning the query from the script include, I'm using "sys_idIN" + [array of record sys_ids]. I noticed that the Workflow Data Fabric table does not contain the sys_id field that tables native to the platform have, which is why I believe I am seeing the results that I am. I tried returning the Order numbers instead since that value is unique, but it still isn't returning the correct data. Does anyone know how to properly achieve what I'm trying to do? I attached the Type specification for the variable and the method from the script include that is being called from the Reference qualifier field on the variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago - last edited a week ago
Hi @Mike Grimm, please use script include + advanced reference qualifier to achieve what you want,
Here is a script example, script include:
getOrdersForAccount: function (accountValue) {
var orderNumbers = this._getOrderNumbers(accountValue); // returns an array of order_number values
if (!orderNumbers.length) {
return 'order_numberISEMPTY'; // or any query that returns nothing
}
return 'order_numberIN' + orderNumbers.join(',');
}
, and advanced reference qualifier:
"javascript:new MyQualifier().getOrdersForAccount(current.variables.account);"
Hope it helps. If my answer was helpful, please don’t hesitate to give it a thumbs-up - it only takes a second, but it means a lot to me. Thank you!
Best regards,
Renat Akhmedov
