Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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
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.
You could also use the Property Display widget
This widget can also dynamically accept a DataShape
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
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);
}
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.