queryDef select memo type field in javascript acitivity
Hi!
I am attempting to simply select memo type field from a schema, but the javascript activity keeps throwing an error that "@description" is undefined. It seems to be related to the type of the attribute rather than a syntax error.
Can anyone point me in the direction of how to solve this? Thank you very much in advance! 🙂
Error:
29/11/2022 11:37:25 SOP-330011 Error while executing the method 'ExecuteQuery' of service 'xtk:queryDef'.
29/11/2022 11:37:25 XTK-170036 Unable to parse expression '@description'.
29/11/2022 11:37:25 Attribute 'description' unknown (see definition of schema 'Series (kap:series)').
Schema:
<element desc="Series" label="Series" labelSingular="Series" name="series">
<dbindex name="sId" unique="true">
<keyfield xpath="@sId"/>
</dbindex>
<key internal="true" name="sId">
<keyfield xpath="@sId"/>
</key>
<attribute desc="The alphanumeric ID of the series." label="Id" name="sId" type="string"/>
<attribute desc="The title of the series." label="Title" length="150" name="title"
type="string"/>
<element desc="A longer description." label="Descripton" name="descripton" type="memo"/>
<attribute desc="The channel this series was broadcast on." label="Channel Code"
length="100" name="channelCode" type="string"/>
<attribute desc="URL for the information of the series" label="URL" length="400"
name="url" type="string"/>
<attribute desc="Series Image URL" label="Series Image URL" length="400" name="mediaLocationUri"
type="string"/>
<attribute default="GetDate()" label="InsertOrUpdatedDateinAdobe" name="InsertOrUpdatedDateinAdobe"
type="datetime"/>
</element>
Code:
var query = xtk.queryDef.create(
<queryDef schema="kap:series" operation="select">
<select>
<node expr="@url"/>
<node expr="@description"/>
</select>
<where>
<condition expr={"[@description] IS NOT NULL" }/>
</where>
</queryDef>
)
var result = query.ExecuteQuery();
logInfo(result);
for each(var res in result){
logInfo(res.@description);
}


