Hi Alex,
Sorry again, the raw html editor did it wrong so I copy/paste directly as is the JS code:
// itemized list (énumération in French) for a database enum (xtk:enum)
var enumId = "576797577"; // webAppNature itemized list (check your value in your own instance)
var queryXtkEnumValue = xtk.queryDef.create(
<queryDef schema="xtk:enumValue" operation="select">
<select>
<node expr="@label"/>
</select>
<where>
<condition expr={"[@enum-id]=" + enumId} />
</where>
</queryDef>)
try
{
var resXtkEnumValue = queryXtkEnumValue.ExecuteQuery();
logInfo("[WKF337] get the values enumValue of the itemized list id = " + enumId + " (xtk:enum)");
logInfo("[WKF337] Count of values = " + resXtkEnumValue.child('enumValue').length());
}
catch(e)
{
logWarning("[WKF337] Error in getting the values enumValue of the itemized list id=" + enumId + " (xtk:enum)");
logError("[WKF337] Error number: " + e); // or use logWarning the treatment must go on despite this error
}
for each(var value in resXtkEnumValue.enumValue) // there is no['enumValue-collection'] node in workflow (as there are in webApp and report)
logInfo("[WKF337] value = " + value.@label);
Regards
J-Serge