IDM 4.8 form builder - check if user exists
We are trying to build a new request form on IDM 4.8 form builder.
The form is being used for creating new user on the IDM.
We need to check if a user is already exists, so we want to add the validation on the idNumber for field (unique field).
The validation function is added to the custom validation option of the idNumber field.
We uses the IDM globalQuery in order to check if the user is exists, based on the value of the field.
The problem is that the IDVault.globalQuery function is an asynchronous function, so the validation function continues after the call to the globalQuery so we cannot wait for it. That is a problem since custom validation function force us to set the "valid" parameter.
I can't find any solution for calling the globalQuery function in a synchronous way.
Can you please advise?
Re: IDM 4.8 form builder - check if user exists
I haven't used the new form builder much at all, but could you leverage something like async await to make your global query more synchronous? I suppose you could also leverage the new REST interface (something like /users/list maybe?). That might be synchronous.