This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Updating Description@ADSAccount stuck in a loop.

Whenever the employment status of a users changes I'm wanting to update their Description@ADSAccount field.  I've modified the template value calculation to try and accomplish this.  It should include the old value plus append the custom value I've created.  The problem is it will insert the old default value then go into a loop with the custom value till it fills up the field.  Here is a code snippet of what I'm trying to do.

If ($[IsLoaded]:Bool$) Then
    If ($FK(UID_Person).IsTemporaryDeactivated:Bool$ = True) And (($FK(UID_Person).CustomProperty02$=Connection.GetConfigParm("Custom\HR\EmployeeStatus\LeaveOfAbsence")) or ($FK(UID_Person).CustomProperty02$=Connection.GetConfigParm("Custom\HR\EmployeeStatus\PaidLeaveOfAbsence"))) Then
        Value = $Description$ & " - " & Connection.GetConfigParm("Custom\AD\AttributesTemplates\AccountDisabledDescription") & " " & Date.Today    
    End If

Parents
  • The loop occurs, because you have a self-reference on $Desciription$ in the template. As long as the description changes, the template will be called.

    Replace the $Description$ with Value. That should solve the problem. Value always contains the current value of the column inside of the template code.

Reply
  • The loop occurs, because you have a self-reference on $Desciription$ in the template. As long as the description changes, the template will be called.

    Replace the $Description$ with Value. That should solve the problem. Value always contains the current value of the column inside of the template code.

Children
No Data