I have a custom table where we stage HR-data before syncing to Person.
There's also a custom angular module where you can create and edit new external identities.
On column has a a defined list of values 0,1,2,3.
I want to be able to limit what certain users see in the Webportal when they create a new external identities.
But it doesn't seem to work, I can se that valueConstraint.LimitedValues are set correctly, but all values are still showing in the dropdown list.
Am I missing something, or is this not supported for imx-cdr-editor?
According to the documentation:
Custom valueConstraint - if it is set it will be used instead of column.GetMetadata().valueConstraint
private createCdrList(columnNames: string[], entity: IEntity): (ColumnDependentReference | undefined)[] { let cdrList: (ColumnDependentReference | undefined)[] = []; cdrList = this.cdrFactoryService.buildCdrFromColumnList(entity, columnNames, false); cdrList.map((field) => { // Set minimum length for EmployeeID if (field?.column.ColumnName === 'CCC_EmployeeID') { field.minLength = 12; } // Limit CCC_EmployeeType to allowed values if (field?.column.ColumnName === 'CCC_EmployeeType') { const allowed = this.allowedEmployeeTypes; const limitedValues = field.column.GetMetadata().GetLimitedValues(); if (limitedValues) { field.valueConstraint = { ...field.valueConstraint, LimitedValues: limitedValues.filter(v => allowed.includes(String(v.Value))) }; } } }) return cdrList; }