TCC - Create a Generic Set via Free Definition and include it in a Set

Create a Generic Set via Free Definition and include it in a Set


This pages describes how to create a new Generic Set via the Free definition node that will detect objects that you can include in other Sets in the Free Definition node. The example below shows how to create sets via Types.

Example scenario:

  • Your code contains specific data functions (in this case SQL views) that are always named with _company as a suffix.
  • We will create a Generic Set to detect these objects and include the Generic Set in another Set.
Example
  • Move to the Free definition node - in this example we are creating a Generic Set to detect objects that will be classed as Data Functions, so we are working in the Free definition node under the parent Data Functions node:

  • In the right hand panel, right click in the right upper panel and select New Line:

  • A new Generic Set will appear in the panel.
  • Edit the Description column to reflect what this Generic Set will do, for example SQL View _company. Double click the field to invoke the text editor and make the change.

  • Now drag the Generic Set into the Design window. The Set will appear as a box as shown below - you can move this box around if required:

  • In the Types & Properties panel, tick the Show only application types (only those object types currently stored in the Analysis Service will be displayed under the Types node).
  • Expand the types node and locate the SQL View object type:

  • Drag the SQL View type over to your Generic Set displayed in the Design window. Drop the item on the Generic Set:

  • You have now configured the Set to detect all SQL Views. Now add an additional criteria to filter on the names of the SQL Views.
  • Expand the Identification node in the Types & Properties panel
  • Drag the Name item over to the Set in the Design window:

  • At the same time the Properties dialog (see Working with block elements for more information) will be displayed enabling you to configure the string that needs to be searched:

  • The Identification radio will be pre-selected, as will the Name type in the Property list as shown above. We have chosen the Like operator to match the string we require and entered a simple value %_company that will match all objects named with the _company suffix.
  • Click OK to confirm.
  • The Set is now complete:

  • You can check that your criteria detect the objects you require by right clicking the Set and selecting Generate set. A dialog box will be displayed listing all the objects that match the Set's criteria.
  • Next you can then use member-of or excluded-from option to re-use the Generic Set in an existing Set or Sets:

  • Choose the Generic Set you want to use (in this example this is the Generic Set we have created above):

  • The Generic Set will then be included in your Set:

Notes - that you can re-use Generic Sets in any number of existing Sets - you can re-use standard Sets in existing Sets

See Also

Create a Generic Set via Free Definition and include it in a Set | Set creation | Where should sets be created?


CAST Website