subQuery.resetPagination();
subQuery.getContext().setParent(context);
subQuery.getContext().setVariable("current", iRecord);
varValue = ODatabaseRecordThreadLocal.INSTANCE.get().query(subQuery);
} else if (letValue instanceof OSQLFunctionRuntime) {
final OSQLFunctionRuntime f = (OSQLFunctionRuntime) letValue;
if (f.getFunction().aggregateResults()) {
f.execute(iRecord, iRecord, null, context);
varValue = f.getFunction().getResult();
} else
varValue = f.execute(iRecord, iRecord, null, context);
} else if (letValue instanceof String)
varValue = ODocumentHelper.getFieldValue(iRecord, ((String) letValue).trim(), context);
else
varValue = letValue;