Perspective table binding in narrow mode

I have a named query that returns a single row of batch data, e.g.:

ID: ABC123
Description: My Batch
WeightSP: 100
WeightPV: 101
Status: Complete

…and I would like to display it in a table, looking just like it does above. However, when I bind the table data to the query, it returns it in a wide format:

  ID     Description    WeightSP   WeightPV     Status
ABC123    My Batch        100        101       Complete

Is there any way to have the table display in narrow format without doing too much complex scripting which will break my ability to write the dataset back to the database with updated values?

You could do some scripting to create a new dataset that’s in a narrow format. Then, that dataset can be used to display your data in the table, but that should not break your ability to write back to the database. Can you provide an example of how that would prevent you from writing back to the database?

What database flavor are you using? If it is MSSQL then you can use UNPIVOT.

Thanks, yes MSSQL and that’s just the trick I was looking for. Thanks!

1 Like