The OOTB Survey Calculation is not setting the Survey Required flag from Service Desk 7.5

Version 7

    Verified Product Versions

    Service Desk 7.6Service Desk 7.7.xService Desk 7.8.xService Desk 2016.xAsset Manager 2016.x


    From Service Desk version 7.5 calculation that sets the survey flag does not run which causes the surveys not to be sent.



    The calculation for this uses the Incident number to calculate if a survey needs to be sent out, however the calculation is actually run before the Incident number is generated so no Incident number exist.

    This has been logged as problem 5454. If you are experiencing this problem , please log this with your LANDESK support provider quoting the problem reference number: 5454



    The solution is to move the survey calculation further back in the process so that it runs after the Incident number has been set.


    Please make sure that any changes made using Designer, are tested first on a test copy of the database. Any changes should be carried out by a Designer trained technician. Before any changes are made to the live database, a backup of the database must be taken and nobody else should be logged in while changes are made. In the event of any problems after making changes, the database should be restored from the backup copy.


    1) In Process Designer deactivate the process you are making changes to and remove the 'Set Survey Flag' action and remove the Survey required precondition and the survey required condition from the process.


    2) Then add a new precondition and condition into the process to replace the survey required precondition. When asked for the condition type select Calculation, in the formula use the following calculation:


    import System
    static def GetAttributeValue(Incident):
     Frequency = 10
     is_divisible = false
     if Incident.RaiseUser != null:
      if Incident.RaiseUser._DoNotSurvey == null:
       is_divisible = (Incident.Id % Frequency == 0)
      if Incident.RaiseUser._DoNotSurvey != null:
       if Incident.RaiseUser._DoNotSurvey.ToString() == 'False':
        is_divisible = (Incident.Id % Frequency == 0)
     return is_divisible


    The survey require frequency above can be changed 10 equates to 1 in every 10 emails.


    The condition can then be set to equals with the value of true.


    3) Then save and activate the process.