DataLayer.Definition List - Example Usage: With an Input Select List
In the following example, you'll see how to use DataLayer.Definition List with an Input Select List element, so that users can select report definitions to see at runtime.
Start by adding an Input Select List element to your report definition and setting its attributes as shown above. Referring to the table of returned columns from DataLayer.Definition List - Working with DataLayer.Definition List, use "DefinitionName" for the Caption Column and Value Column attribute values.
Next, add a DataLayer.Definition List element beneath the input element, as shown above. You only want to present users with a choice of report definitions, so set the Definition List Folder attribute to _Reports. Without this, they'd also see Process, Widget, and all other definitions.
When you preview the report, you see that your list is populated, but there's a problem: the list includes many report definitions in subfolders that you don't want users to see. To fix this, filter the datalayer:
As shown above, add a Compare Filter beneath the datalayer. Set its attributes to keep only definitions that have an underscore in their names.
Now when we preview the definition again, we see that the list includes the desired set of definitions.