Valid DeriveFields expressions
Hi Everyone,
We are trying to fill in a thing name in the GetDesignTimePermission result infotable using the DeriveField snippet.
var params = {
type: "Thing" /* STRING */,
maxItems: 1000000 /* NUMBER */
};
var result1 = Resources["EntityServices"].GetEntityList(params);
var result2 = Things[result1.rows[0].name].GetDesignTimePermissions(); //This is only for a single entity for testing purposes
var params = {
types: "STRING" /* STRING */,
t: result2 /* INFOTABLE */,
columns: "EntityName" /* STRING */,
expressions: "result1.rows[0].name" /* STRING */
};
var result = Resources["InfoTableFunctions"].DeriveFields(params);
However we are having trouble finding a valid expression.
Error executing service GetDesignTimePermissionsforUser. Message :: Script evaluation error : ReferenceError: "result1" is not defined. (DSLCompiledExpressionProcessor#1) - See Script Error Log for more details.
What would be a valid expression to add the relevant thingname in a new column using DeriveFields?
Thanks,

