Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
000039820
No target records are available for selection when adding a new record for a Questionnaire (as shown below):
Also, if you package the Questionnaire and its target Application and try to install the package in another environment, the package installation fails with the below message:
Package installation failed. Target level for Questionnaire <module_id> was not found.
This could occur if the Level that was originally targeted by the Questionnaire has been deleted.
Execute the below scripts (in order) against the Instance Database:
1. Find the Questionnaire's current Target Application and Target Level by running the following script:
SELECT mt1.module_name as Questionnaire , mt1.module_id as 'Questionnaire Mod ID' , mt2.module_name as Target_Module , mt2.module_id as Target_Mod_ID , lt.level_name as Target_Level , m1.target_level_id as Target_Level_ID FROM tblmodule m1 JOIN tblModuleTranslation mt1 on mt1.module_id = m1.module_id JOIN tblLevelTranslation lt on lt.level_id = m1.target_level_id JOIN tblLevelTranslation lt2 on lt2.level_id = m1.target_level_id JOIN tbllevel l2 on l2.level_id = m1.target_level_id JOIN tblmodule m2 on m2.module_id = l2.module_id JOIN tblModuleTranslation mt2 on mt2.module_id = m2.module_id WHERE m1.module_type_id = '7' AND mt1.language_id=1 AND lt.language_id=1 AND lt2.language_id=1
2. List the Levels for the Target Application:
SELECT mt.module_name , m.module_id , lt.level_name , l.level_id FROM tblModule m JOIN tblModuleTranslation mt on mt.module_id=m.module_id JOIN tblLevel l on l.module_id = m.module_id JOIN tblLevelTranslation lt on lt.level_id=l.level_id WHERE mt.module_name = 'Policies' --> INSERT EXACT MODULE NAME AND mt.is_default='1'
3. Determine which Level you want the Questionnaire to target. Then, change the target level for the Questionnaire:
Kindly note that the below script modifies the database. Therefore, necessary measures such as, but not limited to, taking a database backup and testing the script in a non-prod environment first should be done before executing any SQL queries and/or applying any changes in the Database.
UPDATE tblmodule SET target_level_id = 'nnn' --> INPUT NEW TARGET LEVEL ID WHERE module_id = 'nnn' --> INPUT QUESTIONNAIRE MODULE ID