Is it possible to have one field in a "Create User" request to be required depending on the value of another.

For instance, if i selected the EmployeeType as staff, the EmployeeNumber would become a required field, but if i chose Contractor, this field would not be required.

I have tried to have two different property patterns assigned to the same users OU one for employee and one for contractors but this doenst give the desired effect. To get aorund this i could have two seperate forms, one for staff and one for contractos but i wanted to see if there was a neater way to provide the pre-submit validation.

by (60 points)

1 Answer

by (216k points)
0 votes

Chris,

Actually, you have three options.

Two of them you have already listed, that is using different Property Patterns and different Create User forms. The third one is to check EmployeeType with a PowerShell script and make the EmployeeNumber property required depending on the value of the EmployeeType property. See the Validate/Modify User Input Using a Script Tutroial. Note, however, that this check will only be performed after the create user request has been submitted.

Related questions

I recently added our EntraID tenant into Adaxes. I can view all users and objects from the Adaxes console. When I login to the admin web interface, that domain isn't showing under Managed Domains. I just updated Adaxes to the latest version.

asked 4 days ago by tromanko (350 points)
0 votes
1 answer

I'm trying to run a powershell script that triggers before updating a user, but only run it if the action comes from the self-update web interface. Is that possible?

asked Sep 4 by jaymallery (40 points)
0 votes
1 answer

When creating a new user through the webinterface, the password is generated based on the template configured in the 'user pattern'. The domain password policy can also ... the webinterface and preventing the 'password not required' AD attribute being set.)

asked Jan 6 by maarten.vaes (140 points)
0 votes
1 answer

I'm lost as to why "Create User" doesn't show up. I made a new dashboard, mirroring the default Help Desk. Under Actions, I enabled Create User. On the web interface, the option to create a user is not showing. Am I missing a step?

asked May 15, 2024 by tromanko (350 points)
0 votes
1 answer

I'd like to limit users from being able to login to the Web interface. In other words, if a user opens multiple browsers or tabs, can I prevent them from being able to login to each tab/browser and starting multiple sessions? Thanks!

asked Apr 10, 2024 by cewilson (300 points)
0 votes
1 answer