Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
SBr
Partner - Contributor
Partner - Contributor

getTableData only returns 255 characters per coulmn

Using getTableData (through Enigma), I noticed it strips data after 255 characters. The documentation does not say anything about such a limitation.

I guess either the docu should be enhanced or the limit dropped.

Labels (2)
2 Replies
alex_colombo
Employee
Employee

Hi @SBr , you are noticing this limitation in which kind of table field? We have Characters limitations in our product as per this link. It is not a limitation of the API.

RealCKh
Contributor
Contributor

I noticed the problem, too. With getTableData() values are truncated to 255 characters. I built a minimal example, ZIP is attached. The interesting part is this:

const appId = "<SET_APP_ID>";
const hostName = "<SET_HOST_NAME>";

const urlConfig = {
    appId: appId,
    host: hostName,
    port: 443,
    secure: true,
    prefix: ''
}
const senseUrl = SenseUtilities.buildUrl(urlConfig);

const enigmaConfig = {
    schema: schema,
    url: senseUrl,
}

const script = `
TestTable:
Load * Inline [
	Key, Value
    test1, '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
]
`;

let session = enigma.create(enigmaConfig);
session.open()
  .then((global) => global.openDoc(appId))
  .then((doc) => doc
    .setScript(script)
    .then(() => doc.doReload())
    .then(() => doc.getTableData(0, 1, false, 'TestTable'))
    .then((data) => console.log(data)))
  .then(() => session.close())
  .then(() => console.log('Session closed'))
  .catch(err => console.log('Something went wrong :(', err));

To run, extract the ZIP, set App ID and Qlik host in src/App.js and run npm i and npm start. Go to http://localhost:3000 and look at the console, the value is truncated after the zeroes.