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 

Parents
  • 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

Reply
  • 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

Children