Configuring Sample Sheet list |
Top Previous Next |
When SamplingXL the client is run it displays a list of sample sheets in a grid for easy navigation and lookup.
You are able to configure what fields are displayed in the grid.
Also, you can configure what fields are available in the Sheets table for database queries and reporting on sample sheets. These fields can be indexed or searched on very efficiently.
These fields are configured by adding stored computed fields to the Sheets table.
The fields displayed on the SamplingXL grid are specified in a view called SheetDescriptors.
Thus these two sets of fields can be independently configured.
The following is a sample script to add some typically useful fields to the Sheets table:
alter TABLE [dbo].[Sheets] add [Sampler] AS ([Sheet].[GetFields]().StringValue('$CreatedBy')) PERSISTED, [Created] AS ([Sheet].[GetFields]().GetDateValue('$CreatedDate')) PERSISTED, [AuthorizedBy] AS ([Sheet].[GetFields]().StringValue('$AuthorizedBy')) PERSISTED, [AuthorisedDate] AS ([Sheet].[GetFields]().GetDateValue('$AuthorizedDate')) PERSISTED, [SheetType] AS ([Sheet].[GetSheetType]().GetName()) PERSISTED, [ReferencedPegs] AS ([Sheet].[ReferencedPegs]()) PERSISTED, [Bounds] AS ([Sheet].[BoundsBinary]()) PERSISTED
The last field that is good to add is the bounds of the sheet in 3D space, which is used by the SamplingXL client to search for sheets in geographic locations.
To view all these fields in the client you can alter the SheetDesriptors view as follows:
ALTER VIEW [dbo].[SheetDescriptors] AS SELECT GUID, Sheet, Sampler, Created, AuthorizedBy, AuthorisedDate, SheetType, ReferencedPegs, Bounds FROM dbo.Sheets |