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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to change an Infotable datashape for exporting purposes?

tcoufal
12-Amethyst

How to change an Infotable datashape for exporting purposes?

Hi Guys,

I am  currently facing one unpleasantness. I am working with export extension, which takes an Infotable as argument (parameter) an creates the Excel (Word and PDF) document and stores it inside the repository.

I am using service GetImplentedThingsWithData and want to export its results, problem is that this dataShape is quite large and it contains properties which I dont actually need to be present inside the target document.

If I would use service from Thing-perspective I would create a service, which would call another service and from its results create a simplified results (based on original DataShape subset).

But I cannot find GetImplementedThingsWithData service which I could call from ThingTemplate.

Any suggestions about how to achieve this functionality with minimal effort?

Thanks

2 REPLIES 2

Hi Tomas,

You should create a Thing Helper for that Thing Template, a kind of Static Thing Services for that Thing Template.

Let's name it MyTemplate to the Template, and MyTemplateHelper to the Thing with Static Services for MyTemplate.

Then on that Thing, implement a service which queries the implementing things:

var result = ThingTemplate["MyTemplate"].GetImplementingThingsWithData();

And then removes the undesired columns

result.RemoveField("fieldName1");

result.RemoveField("fieldName2");


...

tcoufal
12-Amethyst
(To:CarlesColl)

Very interesting approach. I will give it try and let back to you.

Tomas

Top Tags