Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi everyone,
In our case,we want to change the location of fields in the InfoTable.
We would like to show the data like report.
For example,in this picture,we want to change the column "Hours" to the first column.
Is there any solutions?
Many thanks,
Allan,
(Lanner, b10102127@gmail.com)
Solved! Go to Solution.
can't really change the order of your columns in the infotable, but if you are outputting that to a Grid, you can go into Configure Grid columns to rearrange the column order in the grid.
Oops i see csv export. you can try editing the datashape but I don't think that will cause a change.
you could try to apply some sort ahead of returning the result and see its influence.
Hi Allan,
How would you show the data of the InfoTable ? With a Grid, the order of the columns can be changed manually.
Quang-Dung
Hi Quang-Dung,
Thank for your response.
In our case,we would like to export the data as a CSV file.
We need to change the position of the columns in our data,and display it as a report.
For example:The report will show the "Hours" at 1st column.
Many thanks,
Allan
In my case, it was possible through a Stream and not a ValueStream. The DataShape binded to the Stream determines the order of the columns in the data.
Of course, there's an extra work to populate the Stream, but a Stream give more manipulations on data. Especially it could be used with the DataFilter and then DataExport to export only the data filtered.
In our case,we log the data by Stream.
We do some calculation in our InfoTable by using snippets - DeriveFields,and it will add additional columns in the InfoTable .
Through this snippets ,the order of the columns in the InfoTable will be random.
So,we just want to changed the order of the columns manually in our InfoTable.
can't really change the order of your columns in the infotable, but if you are outputting that to a Grid, you can go into Configure Grid columns to rearrange the column order in the grid.
Oops i see csv export. you can try editing the datashape but I don't think that will cause a change.
you could try to apply some sort ahead of returning the result and see its influence.
As what I tried, the order of the fields definition of the DataShape determines the order of the columns exported by DataExport. In a Grid, the order of the columns can be changed, but it does not change the order of the columns in the csv export file.
With DeriveFields, the order of the columns in the InfoTable is not really random.The column of DeriveFields is at the 1st position, but the rest follow the order of the fields defintion of the DataShape of the original data (before apply DeriveFields). For example: if I have "oldData.DeriveField --> newData", the order of the columns in "newData" will be: DeriveField __ order of the fields definition of oldData. Even when I change the order of the fields definition of the DataShape of "newData", the order is not changes in the InfoTable result after applied DeriveField. I did not try to apply DataExport to this InfoTable result.