Skip to main content
10-Marble
January 21, 2023
Solved

How I can show selected properties in a Line Chart Widget (Mashup)

  • January 21, 2023
  • 1 reply
  • 1386 views

I'm getting all properties from a Thing in a mashup.

How I can get rid of one of them (FaultCode for example)?

 

alcubierre_0-1674324767884.png

 

alcubierre_1-1674324796123.pngalcubierre_2-1674324808786.png

 

 

 

Best answer by jensc

Hello,

 

One way you could do this would be to create your own service and filter out your data in there.

 

Regards,

Jens

1 reply

jensc17-PeridotAnswer
17-Peridot
January 22, 2023

Hello,

 

One way you could do this would be to create your own service and filter out your data in there.

 

Regards,

Jens

10-Marble
January 28, 2023

I have accomplished following your suggestion and works,,,, but I suspect that should be a shorter way.......

 

var modelProperties = Resources['InfoTableFunctions'].CreateInfoTable({infoTavleName: "modelProperties"});

modelProperties.AddField({name: "name", baseType: "STRING"});

modelProperties.AddField({name: "description", baseType: "STRING"});

modelProperties.AddRow({name: "PreheatTemperature"});

 

var data = me.QueryNamedPropertyHistory({

    propertyNames: modelProperties,

    maxItems: 1000

});

 

result = data.ToJSON();

 

or this one:

 

let data = me.QueryNumberPropertyHistory({
"propertyName": "PreheatTemperature"
});

data.RemoveField("id");

result = data.ToJSON();


});

result = data.ToJSON();

17-Peridot
January 30, 2023

Hello,

 

I haven't really used these "QueryNamedPropertyHistory" and"QueryNumberPropertyHistory" services.

But if the services work, then that should be fine!

 

Regards,

Jens