How to make attribute required under certain conditions?

When editing a person in Manager I can see that "Last working day"(DateLastWorked.) field is getting marked as required as soon as I set a value in "Leaving Date"(ExitDate)
If I remove "Leaving Date" then "Last working day" is not required anymore.

It is a very useful feature but I can't find how to configure it. Does anybody know? Or it is just hardcoded for some OOTB attributes?

We are using 8.1.0

Parents
  • This functionality is part of the so-called customizers and is indeed hardcoded. See this thread https://www.oneidentity.com/community/identity-manager/f/forum/5748/mandatory-fields

    You can provide your own customizers, there is a sample in the SDK, but I would only do this if this is really necessary.

    If your Manager application has a direct SQL Connection (Not via the Application Server) you can code something like this in the template of a column, that changes the MinLen property of the column but I wouldn't recommend this. The sample shows the potential template code on the Person.CustomProperty01 column that makes the property mandatory if the ExitDate is greater than the MinDate.

    If $ExitDate:Date$ > DbVal.MinDate Then
        Base.Columns("CustomProperty01").MinLen = 1
    Else
        If $ExitDate:Date$ = DbVal.MinDate Then
           Base.Columns("CustomProperty01").MinLen = 0
        End If
    End If

    Again, this code will not change the MinLen if the connection is against an Application Server.

Reply
  • This functionality is part of the so-called customizers and is indeed hardcoded. See this thread https://www.oneidentity.com/community/identity-manager/f/forum/5748/mandatory-fields

    You can provide your own customizers, there is a sample in the SDK, but I would only do this if this is really necessary.

    If your Manager application has a direct SQL Connection (Not via the Application Server) you can code something like this in the template of a column, that changes the MinLen property of the column but I wouldn't recommend this. The sample shows the potential template code on the Person.CustomProperty01 column that makes the property mandatory if the ExitDate is greater than the MinDate.

    If $ExitDate:Date$ > DbVal.MinDate Then
        Base.Columns("CustomProperty01").MinLen = 1
    Else
        If $ExitDate:Date$ = DbVal.MinDate Then
           Base.Columns("CustomProperty01").MinLen = 0
        End If
    End If

    Again, this code will not change the MinLen if the connection is against an Application Server.

Children
No Data