Mandatory Fields in Angular Web Portal

Hello,

I am using One Identity Manager v9.2.

I want to make the Valid Until and Reason fields mandatory in the Angular Web Portal. Employees shouldn't be able to submit a request without filling in these fields. How can I enforce this in the Angular Web Portal?

BR,

Volkan 

  • Hello,

    I assume you would want to create a custom form in the Angular code?

    If this is the case you can always set the minLength on the column. For this you will need to add a custom method to the source code in the Angular class that is responsible for generating the form.

    Here is a code snippet to help you out. Be sure to place this code in a custom method since you need to return the columns to display the form in the web portal.

    this.cdrListPersonal = this.cdrFactoryService.buildCdrFromColumnListAdvanced(this.data.selectedIdentity.GetEntity(), columsThatWillBeShown, readOnlyColumns);
    
    // add mendatory fields here
    this.cdrListPersonal.map((field) => {
    if(field.column.ColumnName === "The column name goes in here") {
    field.minLength = 1;
    }
    })
    
    return this.cdrListPersonal;

    Hope this provides some additional information to help you with this problem.

    Zan

  • Alternative OOTB config option

    Create a new Request property (new definition)
    Ex: ShoppingCart

    On the parameters tab click Add
    Parameter name = OrderReason
    Parameter type = User prompt
    Display name = Reason
    Mandatory parameter = Yes

    On the parameters tab click Add
    Parameter name = ValidUntil
    Parameter type = User prompt
    Display name = Valid until
    Mandatory parameter = Yes
    Go to 'Value definition' tab and set Date type = Date

    Save and set this "Request property" on the service item.

  • You can control the reason with the property "Reason type on request" at each service item.

    For valid until I suggest providing a valid until-date by default, let's say 30 days, to ensure that an entitlement has a limited lifetime. You can do that via a value template in Designer.

  • Hello Zan,

    Thank you for your support.