Skip to content

Is there a way to control the column order of a Custom Logical Unit's generated table (_CLT), so it matches the order fields were added in (useful for comparing column-by-column against a source data structure), rather than the fields always ending up alphabetized?

Answer

There's no clean, fully working solution — fields in a published Custom LU's generated table default to alphabetical order regardless of the order they were added in the definition. Publishing the CLU after adding each individual field (rather than adding them all then publishing once) does partially preserve insertion order in the table, but the result still isn't a clean match to the original source order (the first three columns end up as ROWKEY, the first field added, then ROWVERSION, with the rest following in order), and doing this is significantly slower than a single bulk publish. Even with that workaround, querying through the corresponding view (the _CLV) still lists fields alphabetically regardless — so preserving order in the underlying table doesn't actually help once you're working through the view, which is how most consumption of a Custom LU's data happens in practice.

← Browse Developer Studio, deployment, and upgrades questions