Expand my Community achievements bar.

SOLVED

Workflow Table Field size > 255

Avatar

Level 5

Hi Team,

 

I am using a query in a workflow that group records and concats field. The result of this concat field sometimes extend beyond 255, which triggers an error in the Query workflow activity, is there a way to accommodate characters > 255, in a temporary worktable.

 

The idea is to use that conca field later in the workflow activity to do further processing

 

 

I tried using the Edit Schema, but not sure how to go about it ?

 

Please suggest some alternatives

 

Regards,

DG

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @dipendu_g 

 

You can create a JavaScript library and then call it in any workflow, templates etc. by using the function loadLibrary.

loadLibrary

Use Javascript libraries in Adobe Campaign

 

Regards

Akshay

View solution in original post

17 Replies

Avatar

Community Advisor

Hello @dipendu_g 

 

You can use the XML Memo field from Recipient schema in an Enrichment and change the alias according toy our requirement and use this field. This newly created field will inherit the length of the XML Memo field which is 2000 characters.

 

Manoj_Kumar__0-1717545748308.png

 

Manoj_Kumar__1-1717545794036.png

 


     Manoj
     Find me on LinkedIn

Avatar

Level 5

Hi @_Manoj_Kumar_ ,

 

Thanks for your reply, I am using a user defined SQL Function(xtk:funclist), that creates a string > 255 characters. I am still getting the String truncate error.

 

 

 

Regards,

DG 

Avatar

Community Advisor

@dipendu_g  Can you share a screenshot of this setup?


     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

The setup looks alright. What is the error?


     Manoj
     Find me on LinkedIn

Avatar

Level 5

Hi @_Manoj_Kumar_ 

 

ODB-240000 ODBC error: String '...' is too long and would be truncated SQLState: 22000

The String size is greater than 255, so this error, else it works fine

 

 

Regards,

DG

Avatar

Community Advisor

Can you please share a screenshot of how this is configured in enrichment?

Manoj_Kumar__0-1717559458275.png

 


     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

@dipendu_g  instead of creating a new output column use the existing XML memo to write the function


     Manoj
     Find me on LinkedIn

Avatar

Level 5

Hi @_Manoj_Kumar_ ,

 

Can you show me with an example as the StringAgg function is using the @firstName  field of recipient.

 

It will help 

 

Regards,

DG

 

Avatar

Level 5

Hi @_Manoj_Kumar_ ,

 

Can you help with an example, if possible ?

 

Regards,

DG

Avatar

Community Advisor

Hello @dipendu_g  looks like this is not possible with enrichment.

 

You will have to use JavaScript for concat and then use the variables to print data in delivery

 

 


     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

Hi @dipendu_g 

 

You can use the JavaScript to concatenate the string as Below:-

var result = '';

var name = new Array("A1", "A2", "A3");
for (var i=0; i<name.length; i++){


fName = name[i];
logInfo ("fName "+name[i]);
result = result.concat(fName, ",");
logInfo ("Result "+result);
} 

 

Regards

Akshay

Avatar

Level 5

Hi @AkshayAnand@_Manoj_Kumar_,

 

The requirement is to create a new SQL function so that can be easily used by the Campaign Managers, like other SQL functions

 

Is 255 Characters max in case of temporary table created in workflow, or can they be extended to hold larger value 

 

Regards,

DG

Avatar

Correct answer by
Community Advisor

Hi @dipendu_g 

 

You can create a JavaScript library and then call it in any workflow, templates etc. by using the function loadLibrary.

loadLibrary

Use Javascript libraries in Adobe Campaign

 

Regards

Akshay

Avatar

Level 7

Try adding a new SQL Activity with this code:

ALTER TABLE <%= vars.tableName %>
ADD LongString NCLOB;

and then insert in that LongString the concat 

Avatar

Level 5

There is no change, I mean no column is added after the transition. I used Varchar instead of NCLOB.

 

Can somebody please post the setup, if possible

 

Regards,

DG