Expand my Community achievements bar.

Query how Extract FDA External table names with Regular expressions in Adobe Campaign classic

Avatar

Level 4

Hello everyone,

Need Suggestions!

I am trying to list all workflow that are using external tables(FDA) in adobe campaign classic

my workflow contains :

1st:Query activity: We are querying XTKWorkflow table and filtering XML Memo field contains "FDA Table name"

2nd:Javascript Activity: 

var schemaName1 = vars.targetSchema.substr(vars.targetSchema.indexOf(":") + 1);

logInfo(schemaName1);var query = xtk.queryDef.create(

<queryDef schema={vars.targetSchema} operation="select">

<select>

<node expr="@id"/>

</select>

</queryDef>

);

result1 = query.ExecuteQuery();

for each (var e in result1) {

var dValue = sqlGetMemo('SELECT mData FROM xtkWorkflow WHERE iWorkflowid = $(l)', e.@id);

logInfo("workflow-data: " + dValue);

now here I need to extract external table names using Regular expression

}

please help  suggest how can I achieve this.

Extract external table names (FDA) using Regular expression in Adobe Campaign

please suggest

 
1 Reply

Avatar

Level 5

Hi @Shruti1 ,

 

Try this piece of code

var str = dValue;
var regex = /schema="(.*?)"/g; 
var matches = str.match(regex); 

 It should extract all schema's from the XML in an array. From there you can further filter and get the FDA tables, filtering on namespaces

 

Regards,