Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Cannot view the data content for field of type Memo in Campaign

Avatar

Level 7

Hi All,

Hope you're doing good!

I am facing a strange issue where I am not able to see the data content of a field which is defined as MEMO.

I have a schema, where I possess 2 fields of type MEMO to hold XML content. Loading of data into these 2 fields is done through JS WriteCollection. When workflow is executed, there is absolutely no error and record got inserted successfully. However, when I am trying to check data under Data tab of Schema I do see empty content under these 2 fields. I am running on PostgreSQL DB.

Not sure what could be the issue, earlier, I worked on Campaign connected to Oracle DB and that time it wasn't the case. I was able to see the content clearly.

Did anyone of you came across such issue, is there any difference when different DB is used. Kindly please help with your suggestions

Regards,

SSB

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I think I had issues in the past using write methods on the memo/xml columns and resorted to using sqlExec to write the data using sql syntax.

View solution in original post

10 Replies

Avatar

Community Advisor

I don't think memo/xml data can be viewed from the data tab schema, but the contents are there, try the following in a new column definition, it should allow you to see some content, if theres too much xml data such as is in the case of deliveries xml memo's content is cropped, but on the database level, everything is there.

 

toString(data)

Avatar

Level 7

Thanks @david--garcia 

This worked, we can view the max content as it is short.

Avatar

Community Advisor

Hello @Ssb_94,

 

To view data stored in MEMO field, use the Generic query editor.

In the ''data preview'' interface choose the ''XML result'' tab.

 

Amine_Abedour_0-1684832573189.png

 

 

Link to documentation here 

 

Br,

Amine

Avatar

Level 7

Thanks @Amine_Abedour 

This suggestion too worked, we can preview the data for MEMO.

Avatar

Level 7

Hi Everyone,

To give some more findings, when I am trying to write data into a MEMO field using Xtk.Session.Write (or) Xtk.Session.WriteCollection, it is storing as blank. When I tried couple of options suggested by our experts, there as well I am still getting blank result. So I changed to sqlExec and now it is reflecting under Data tab of Schema as well as in the couple of suggested options.

Wanted to understand why it is not working through Write/WriteCollection, reason for ask is sqlExec is demanding an additional right "SQL SCRIPT EXECUTION", which is not possible to provision.

So can someone please help me how can I write data into a Memo through Write/WriteCollection ?

Thanks,

SSB

Avatar

Community Advisor

Hello @Ssb_94,

 

Can you share your code to see what's wrong with it ?

 

Br,

Amine

Avatar

Level 7

Hi @Amine_Abedour ,

Please find the details below:

var requestDt = formatDate(new Date(), "%4Y-%2M-%2D %2H:%2N:%2S");
var totalEvents = 2;
var intRequest = 
  '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:interaction">'+
   '<soapenv:Header/>'+
     '<soapenv:Body>'+
        '<Propose>'+
           '<sessiontoken>'+SESSION_TOKEN+'</sessiontoken>'+
           '<targetId>'+EMAIL_ID+'</targetId>'+
           '<maxCount>'+totalEvents+'</maxCount>'+
           '<context>'+
              '<interaction>'+
                 '<inbound>true</inbound>'+
                 '<companyName>Demo</companyName>'+
              '</interaction>'+
           '</context>'+
        '</Propose>'+
     '</soapenv:Body>'+
  '</soapenv:Envelope>';
var intRequestDoc = DOMDocument.fromXMLString(intRequest);

try{
  xtk.session.Write(<demoInfo _operation="insert" xtkschema="dem:demoInfo" requestedAt={requestDt} intRequestPayload={intRequestDoc.toXMLString()} noOfEvents={totalEvents}></demoInfo>);
}catch(e){
  logInfo("Exception: "+e);
}

It is a simple Write Operation, all the remaining field values are reflecting fine, just this one intRequestPayload which is declared as Memo is not. It is defined in schema as below:

<element label="Request Payload" name="intRequestPayload" type="memo"/>

Kindly please help in how can I ensure value is stored as expected.

Thanks,

SSB

Avatar

Level 7

Hello All,

Hope you've got my question

Also for similar question earlier, @Jonathon_wodnicki suggested to use Xtk.Persist.Write instead of Xtk.Session.Write, however I am getting error as Persist.Write not found. So I am literally don't have any options to try.

Please can someone help me with this ?

Thanks,

SSB

Avatar

Level 7

Hello All,

Can anyone please help me if in case you are already familiar with the issue and how to resolve it? I am struck with it since a long time

Specification details of ACC I am using, Client and Server Build Version 9032, PostgreSQL DB

Please let me know if any further details are required.

Thanks,

SSB

Avatar

Correct answer by
Community Advisor

I think I had issues in the past using write methods on the memo/xml columns and resorted to using sqlExec to write the data using sql syntax.