Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Function xtk.session.Write is truncating values

kevinh95689533
Level 2
Level 2

I have a workflow that is using the xtk.session.Write function to insert some data into a custom data schema.

When I log the variable with the data the entire string is there in the audit log.  However, the data is truncated to 1023 characters in the data schema.  The attribute length in the data schema is set to 1500.

 

Is this a bug with the Write function?  Is there a work around?

1 Accepted Solution
Darren_Bowers
Correct answer by
Community Advisor
Community Advisor

Hi @kevinh95689533 -the actual String datatype is defined by the underlying DB used, so it actually can vary: https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/schema-r...

 

I have also found some inconsistencies with some of the datatypes and with the API methods vs workflow. For example, if you use a memo field, you can get >1024 but if you use the HTML field (which is an extension of the memo type) the workflow data activity truncates the field down to 1024 characters. I raised this with Adobe support, but it didn't really go anywhere. Its a "feature" not a bug, etc

Cheers

Darren

View solution in original post

3 Replies
Darren_Bowers
Community Advisor
Community Advisor

Hi @kevinh95689533 - String data type is limited to 1024 characters by default. If you want to store > 1024 chars you need to use a memo element field instead.

I had issues trying to write to a memo element using xtk.session.Write, so I used sqlExec() instead. Just make sure to properly sanitize the input if it is from external sources (webform etc): https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/xtk-session-write-...

Cheers

Darren

kevinh95689533
Level 2
Level 2

@Darren_Bowers thanks for your reply.  If I use a data activity in my workflow I can insert a string > 1024 into the data schema.  This must be a limitation with the xtk.session.Write function.

Darren_Bowers
Correct answer by
Community Advisor
Community Advisor

Hi @kevinh95689533 -the actual String datatype is defined by the underlying DB used, so it actually can vary: https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/schema-r...

 

I have also found some inconsistencies with some of the datatypes and with the API methods vs workflow. For example, if you use a memo field, you can get >1024 but if you use the HTML field (which is an extension of the memo type) the workflow data activity truncates the field down to 1024 characters. I raised this with Adobe support, but it didn't really go anywhere. Its a "feature" not a bug, etc

Cheers

Darren

View solution in original post