Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello,
I want to change the sourceURL based on a thing property.
Currently I have an expression (see below) that has the input of a thing.getpropertyvalues and the output of a string connected to the media sourceURL property. Please see pictures below.
I have verified that the input property is accessible and changes (0 or 1).
Using: ThingWorx 8.4.2-b2151
switch (URL) {
case 1:
return "/Thingworx/MediaEntities/GridLeft";
break;
case 0:
return "/Thingworx/MediaEntities/GridRight";
break;
}
Hello,
Try it like this:
switch (URL) {
case 1:
result = "/Thingworx/MediaEntities/GridLeft";
break;
case 0:
result = "/Thingworx/MediaEntities/GridRight";
break;
}
/ Constantine