EvotecIT/PSWriteHTML

New-HTMLTable or Out-HTMLView issues with FlattenObject and FlattenDepth

mikeroy2k opened this issue · 1 comments

When I try to publish a flattened object with multiple rows and each row has different depths it only publishes the depth of the first file in the row.

So if the first file in the row has a depth of Six. Then subsequent file will also have depth of 6 even if it only has two values. the next 4 values will be empty. If the first file in the row has 2 depth then all the rest of the files in the list will have 2 depth even if they are 6 deep. If i push one file or row at a time to an HTML file it works fine.

out-htmlview states that FlattendDepth is not a valid argument. When using FlattenDepth parameter with New-HTMLTable I see no difference. The Issue Remains

I installed pssharedgoods and ran $myobject = $myobject | convertto-Flatobject and $myobject displays correctly. and shows all the expanded objects.

When I look at $myboject using converto-flatobject it display correctly in my object. all the different depths and data is there. but when i send that object to html using new-htmltable or out-htmlview it only supports the depth of the first file in the row.

All the other data shows up correctly except for the items that were converted to flat.

Also wanted to not that i cant sort by the highest Depth so if highest depth is 8 it will create the 8 new columns and then ever file under it will will have 8 rows as well. if the Depth for the next file is 6 it will show the data but Rows 7 and 8 are empty which is fine. I can understand that... but then if there is a 1 depth item it shows blank as well. only 2 depth items still work but 1 depth is blank. it wont show that data.

You should use -AllProperties switch. It will make sure to preread entire data object you give it including all rows and apply it all. Without it, it's doing only scan of the very first row.