How to Override a Survey Status (Pass, Fail, Incomplete)

Modified on Fri, 23 Jan at 3:56 PM

TABLE OF CONTENTS




Changing Survey Status via the User Migrations Context Menu

This article describes how to change the survey status (Pass, Fail, Incomplete) for one or more users in the User Migrations module using a custom PowerShell script and UI button from the context menu.


Step 1 – Identify the Survey ID

  • Navigate to Administration → User Migrations → Surveys (Moved) (1).
  • Expand the Portal Forms tree (2).
  • Expand the User Migrations tree (3).
  • Select the relevant survey (4).
  • Note the Survey Id displayed (e.g., 73).



Step 2 – Create the PowerShell Script

  • Go to Administration → User Migrations → PowerShell Scripts (1).

  • Click User Migrations (2).

  • Select Click here to add new item (3).





  • Enter a Script Name (1).

  • Open the PowerShell Editor (2).





  • Paste the following script:


$surveys = Get-MSSurveysForModuleItems -Module UserMigrations -SurveyId $ScriptArgs.EventArg2 -InstanceIds $ScriptArgs.Items

foreach($survey in $surveys) {
If($ScriptArgs.EventArg1 -eq 'Pass') { $survey.CompleteResult = $True; $survey.CompletedBy = $ScriptArgs.RanByUser }
If($ScriptArgs.EventArg1 -eq 'Fail') { $survey.CompleteResult = $fail; $survey.CompletedBy = $ScriptArgs.RanByUser }
If($ScriptArgs.EventArg1 -eq 'Incomplete') { $survey.CompleteResult = $null; $survey.CompletedBy = $ScriptArgs.RanByUser }
}

Update-MSSurveysForModuleItems -Module UserMigrations -SurveyReults $surveys
  • Click OK (3).

  • Complete the script configuration fields as follows:

    ColumnDetails
    Script NameOverride Survey Status (any name can be used)
    EnabledTicked
    CategorySurvey (any category can be used)
    DescriptionScript to change the status of a specified survey
    ModuleUser Migrations
    Run AsApi Account
    Grant AccessPower User role group or other appropriate role group
    Click Edit to edit the PowerShell scriptPaste the above script


  • Click Save Changes (4).


Step 3 – Configure the UI Button

  • Navigate to Administration → User Migrations → UI Buttons (1).
  • Identify the survey you wish to target (2).
  • Click the Plus icon next to the target survey (3).
  • Enter the button label, e.g., Override Survey Status (4).
  • Within this button, add three sub-buttons by clicking the Plus icon (5): Pass, Fail, and Incomplete (6).
  • Set Grant Access 1 as appropriate.
  • Under Run Script, select the script name created in Step 2 (7).
  • Use the grid chooser (top right) to enable columns Arg1 and Arg2 (8).
  • In the Arg1 column, enter Pass, Fail, or Incomplete for each sub-button (9).
  • In the Arg2 column, enter the Survey Id identified in Step 1 for each sub-button (10).
  • Click Save Changes (11).






Step 4 – Run the Script from the Context Menu

  • Restart the client application.
  • Navigate to the User Migrations module.
  • Select the users whose survey status you wish to change from the grid.
  • Right-click, then select:
    • Surveys (1) → target survey (2)→ override survey status button (3) → relevant sub-button (Pass, Fail, or Incomplete) (4).


  • Click Continue to confirm the action.


  • A message stating Survey Change Status Complete will appear once the process finishes.





Further Support

For additional assistance, visit the ManagementStudio Service Desk to search the knowledge base or submit a support ticket.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article