Cannot view the data content for field of type Memo in Campaign | Community
Skip to main content
Level 6
May 22, 2023
Solved

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

  • May 22, 2023
  • 5 replies
  • 3096 views

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

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 david--garcia

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.

5 replies

david--garcia
Level 10
May 23, 2023

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)

Level 6
May 23, 2023

Thanks @david--garcia 

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

Amine_Abedour
Community Advisor
Community Advisor
May 23, 2023

Hello @surabattulasr,

 

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

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

 

 

 

Link to documentation here 

 

Br,

Amine

Amine ABEDOUR
Level 6
May 23, 2023

Thanks @amine_abedour 

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

Level 6
May 23, 2023

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

Amine_Abedour
Community Advisor
Community Advisor
May 25, 2023

Hello @surabattulasr,

 

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

 

Br,

Amine

Amine ABEDOUR
Level 6
May 25, 2023

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

Level 6
May 24, 2023

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

Level 6
May 29, 2023

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

david--garcia
david--garciaAccepted solution
Level 10
May 29, 2023

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.