cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to show only the filled properties from an info table in an dynamic property display?

Highlighted
Participant

Is there a way to show only the filled properties from an info table in an dynamic property display?

Hello,

my question is: "Is there a way to show only the filled properties from an info table in an dynamic property display?"

I have the Problem, that my infotable depends on an datashape with a huge amount of properties, for different objects there are different properties filled.

But i don´t want to view the whole infotable each time, just the few properties which are filled with values.

Regards Felix

Tags (1)
5 REPLIES 5
Highlighted

Re: Is there a way to show only the filled properties from an info table in an dynamic property display?

On Property Display you have a "ShoulAllColumns" just make a service which returns the infotable with the exact columns that you want to show. To do that, you must set Output without DataShape and in the service which builds the infotable remove undesired fields or start from scratch and use AddField to add the desired fields. Best Regards, Carles.

Highlighted

Re: Is there a way to show only the filled properties from an info table in an dynamic property display?

You could also use the Property Display widget

This widget can also dynamically accept a DataShape

Highlighted

Re: Is there a way to show only the filled properties from an info table in an dynamic property display?

Is there a way to loop through the columns and if I found an empty value delete this column?

Maybe it could look similiar to this:

for each (var test in infotable1.rows[0]){

    if(test == "" || test == null) infotable1.RemoveField(test.columnName);

}

but then I don´t know how to get the property name or column name.

Regards Felix

Highlighted

Re: Is there a way to show only the filled properties from an info table in an dynamic property display?

It would be:

var dataShapeFields = yourInfotableHere.dataShape.fields;

for (var fieldName in dataShapeFields) {

if (infotable[fieldName].rows[0] == "" || infotable[fieldName].rows[0] == null) {

        infotable.RemoveField(fieldName);

}

Highlighted

Re: Is there a way to show only the filled properties from an info table in an dynamic property display?

If your attempt is to display these infotable values in a Grid, Then you can use the "Advanced Grid" available in the Market place.

It auto filters the data columns that are not populated in the infotable.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!