fix(all): Fix in AS IMAGE generation of single row.
This commit is contained in:
parent
e77b583ff1
commit
618ff5a296
3 changed files with 20 additions and 1 deletions
|
@ -582,6 +582,16 @@ export class DialogKeywords {
|
|||
await DialogKeywords.setOption({ pid, name: 'maxLines', value: count });
|
||||
}
|
||||
|
||||
/**
|
||||
* Define array as output.
|
||||
*
|
||||
* @example SET OUTPUT ARRAY
|
||||
*
|
||||
*/
|
||||
public async setOutput({ pid, value }) {
|
||||
await DialogKeywords.setOption({ pid, name: 'output', value: value });
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a custom user param to be persisted to storage.
|
||||
*
|
||||
|
|
|
@ -625,6 +625,13 @@ export class KeywordsExpressions {
|
|||
}
|
||||
];
|
||||
|
||||
keywords[i++] = [
|
||||
/^\s*(set output)(\s*)(.*)/gim,
|
||||
($0, $1, $2, $3) => {
|
||||
return `await dk.setOutput ({pid: pid, value: ${$3}})`;
|
||||
}
|
||||
];
|
||||
|
||||
keywords[i++] = [
|
||||
/^\s*(set max lines)(\s*)(.*)/gim,
|
||||
($0, $1, $2, $3) => {
|
||||
|
|
|
@ -1121,10 +1121,12 @@ export class SystemKeywords {
|
|||
}
|
||||
}
|
||||
|
||||
const outputArray = await DialogKeywords.getOption({ pid, name:"output" });
|
||||
|
||||
if (table.length === 1) {
|
||||
GBLog.info(`BASIC: FIND returned no results (zero rows).`);
|
||||
return null;
|
||||
} else if (table.length === 2) {
|
||||
} else if (table.length === 2 && !outputArray) {
|
||||
GBLog.info(`BASIC: FIND returned single result: ${table[0]}.`);
|
||||
return table[1];
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue