Directory Enabled ================= This script will display a list of Involvements along with an indication of the Directory setting. This report looks at the `Use Directory` setting, found on the `Settings > Directory` tab of the Involvement. If the setting is enabled, a `Yes` will appear in the `Directory?` column. If the setting has been disabled, a `No` will appear. If you don't see anything in the `Directory?` column, that means no one has yet configured the `Use Directory` setting for this Involvement. You will see those Involvements whose setting has not yet been configured listed first, then the Involvements with the setting enabled (Yes), then the Involvements with the setting disabled (No). This report is already on your database. It may be found under the `Blue Toolbar` on the `Involvement Search` page. The report is under the `Code Icon` in the `Custom SQL Reports` section. The following information is contained on the report (which is also available to be downloaded to Excel): - Involvement ID (link to the Involvement) - Involvement Name - Involvement Type - Directory Indication Sample Report ------------- Notice the sample below. The Involvement ID is a link to the Involvement. On your report, to the left of the data, there will be a button to **Download as Excel** .. figure:: https://i.tpsdb.com/Hayley-SQLDirectory.png :target: # Create the SQL Report --------------------- If this report gets removed from your database, follow the instructions in this help document to create the report. See :doc:`../CreateSqlScript`, using the code below for the script. Name the report `DirectoryEnabled`. .. note:: Be sure that run the report after saving it and then click `Add to Menu` if you want it available on the `Blue Toolbar` on the `Involvements > Search/Manage` page. The first time you run the report from `Special Content`, there will be no data. You run it here so that you can make it available on the menu/toolbar. SQL Code -------- .. code-block:: sql :linenos: SELECT LinkForNext = '/Org/' + CONVERT(NVARCHAR(12), o.OrganizationId), o.OrganizationId [InvID], o.OrganizationName [Name], ot.Description [Inv Type], (CASE ISNULL(o.PublishDirectory, 0) WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE '' END) [Directory?] FROM dbo.Organizations o LEFT JOIN lookup.OrganizationType ot ON ot.Id = o.OrganizationTypeId WHERE o.OrganizationId IN (SELECT Value FROM dbo.SplitInts(@orgids)) ORDER BY o.PublishDirectory DESC, o.OrganizationName | | +--------------------+------------------+ | **Latest Update** | **06/07/2021** | +--------------------+------------------+ Article Created