Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.