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 Community.
For a long time now I have noticed that when using a data table as a data source for a grid, there are some columns that show up in the grid even though you perhaps use a data shape in your service result that do not include these columns.
Example:
Is there any way of hiding/removing these without adding them to the data shape or having to loop over each row and removing field?
Thanks,
Jens
Solved! Go to Solution.
In the "Output" section of the service just select "Is Data table" as Infotable Type. Then you are able to hide those fields in the Grid-Widget without explicit defining or removing them.
Hi @jensc
I also faced a similar issue with DataTable. I used to remove the fields in my service so you don't have to iterate over rows or add fields to Datashape.
// Remove default field from result
result.RemoveField('timestamp');
result.RemoveField('source');
result.RemoveField('tags');
result.RemoveField('key');
/VR
In the "Output" section of the service just select "Is Data table" as Infotable Type. Then you are able to hide those fields in the Grid-Widget without explicit defining or removing them.
Hello @DanZ,
This worked great!
Before changing to "Is Data table":
After changing to "Is Data table":
Perfect, this is exactly what I was looking for!
I can't say I understand what changing this property does exactly, so not sure if it will work in all situations, but for this case, it works great.
Thanks,
Jens
Like the datashape itself it just gives context for the mashup composer what columns are expected. Every data table has those "key, timestamp, location etc." columns. So it will just add those "metadata" information for this infotable output.
But that is only my interpretation.