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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Exclude columns from Dynamic Infotable on the fly

TanmeyTWX
17-Peridot

Exclude columns from Dynamic Infotable on the fly

Hi,

As we know,using Dynamic Infotable doesn't provide the option of attaching a Datashape to the result or we can't. Hence,we can't configure columns of the Grid,using that dynamic Result.

Is there any way to exclude or control the columns of the dynamic Infotable before sending it to the Output or after binding it in the Mashup?

Anyone came across similar requirement?

Thanks,

Tarun

8 REPLIES 8

On the grid you set Show All Columns,

And then on the Server Side Service which returns the Infotable with dynamic fields you just don't set any DataShape.

Then on this service you can Add/Remove Fields as desired with the correspondent Snippets.

Hi Carles,

Show All Columns is required in case of dynamic infotable output but that doesn't provide the option to exclude columns within the Mashup.

And on the service side,I'm getting different columns everytime user does a selection from the Mashup,which is almost unknown.

What you want to do? You want that the user from the mashup has a Columns Picker on a Dynamic Columns Grid?

That's not a problem, the service which returns the dynamic fields should have an input parameter with the Hidden fields, and just on the service use RemoveField snippet.

I'm displaying a Thing Property values which will return property values of all the ThingShapes attached to it,as well.

This Thing will always return some of its common data,say property1,prop2,.....prop10. And, Corresponding ThingShapes data as well.

I want to display the property values of a particular ThingShape attached to it as well as just few common properties of the Thing but not all the 10 properties.

Remote the undesired columns, which it's the problem?

Carles,

I tried the "hardcode" way.

Using "RemoveField" method,mentioned the names of the undesired columns of the Thing and it worked. But I'm afraid,if the field name or entire list of properties changes in future,I would have to edit the service script again for the entire list of properties

You can discover dynamically the Fields that an Infotable has:

var iLF ;

    if ((infotableLeft.dataShape==null)||(infotableLeft.dataShape==undefined)) {

        iLF = infotableLeft.ToJSON().dataShape.fieldDefinitions;

    } else {

        iLF = infotableLeft.dataShape.fields;

    }

jamesm1
5-Regular Member
(To:TanmeyTWX)

The other thing you can do is the reverse approach, using the GetNamedProperties or GetNamedPropertyValues services, to return only those properties you care about, rather than removing the ones you don't. Either should

Top Tags