Enrich MirrorPageURL onto the workflow schema | Community
Skip to main content
Darren_Bowers
Level 9
June 18, 2020
Solved

Enrich MirrorPageURL onto the workflow schema

  • June 18, 2020
  • 1 reply
  • 1563 views

I wanted to enrich the MirrorPageURL for each recipient onto the workflow after the delivery has completed so I can save it in an external system. I've tried using GetMirrorURL from the database functions and that doesn't do anything (besides there being NO documentation on how it works)

So I am trying using JS to reconstruct the MirrorPage URL but I cant seem to get the broadLog-id out of the post-delivery schema:

This is the query I am using:

 

 

get: { records: function( recordsToFetchPerBatch,currentStartLine ) { var query = xtk.queryDef.create( <queryDef schema={vars.targetSchema} operation="select" lineCount={recordsToFetchPerBatch} startLine={currentStartLine}> <select> <node alias="broadLog-id" expr="@broadLog-id" /> </select> <where> <condition expr="@id IS NOT NULL" /> </where> </queryDef> ).ExecuteQuery(); return query; } },

 

But I get the following error:

SCR-160012 Javascript&colon; error while evaluating script 'WKF1279/js'. SOP-330011 Error while executing the method 'ExecuteQuery' of service 'xtk:queryDef'. XTK-170036 Unable to parse expression '@broadLog-id'. Attribute 'broadLog' unknown (see definition of schema 'Email delivery with proof and seed address (temp:deliveryRecurring32)').

Any ideas on how to query the broadLog-id from the temp schema?

Or a better way to enrich the Mirror Page URL onto the schema?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Darren_Bowers

Ok looks like there is an issue trying to read an attribute with a dash "-" in the attribute name in using QueryDef.

I enriched the @broadLog-id value into another attribute on the schema with no dash in the name and it seems to have fixed the queryDef. The MirrorPageUrl seems to generate properly now.

1 reply

Darren_Bowers
Darren_BowersAuthorAccepted solution
Level 9
June 18, 2020

Ok looks like there is an issue trying to read an attribute with a dash "-" in the attribute name in using QueryDef.

I enriched the @broadLog-id value into another attribute on the schema with no dash in the name and it seems to have fixed the queryDef. The MirrorPageUrl seems to generate properly now.