If a form is not available to a user then any other person cannot raise a request on his behalf

Garima Tripath1
Tera Contributor

Hi,

I have a requirement wherein when a person is creating a request and the requested for is some other person for whom the form is not available, I need to alert the user that a request cannot be raised for this person since the form is not available for him. Please advise on how to proceed with this.

Thanks,

Garima

1 ACCEPTED SOLUTION

Shruti
Mega Sage
Mega Sage

Hi,

If Requested for is a field on the form, try to use 'Requested For' variable type instead of reference type

find_real_file.png

 

If the Requested for user doesn't fall under the user criteria, below error message will be displayed and form won't get submitted.

find_real_file.png

View solution in original post

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

So if user is selecting some user in reference variable then how are you determining if the form is available for that person?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar , that's what I am trying to determine

forms are visible to users who have access according to the user criteria, if I have access and someone doesn't, I should not be able to raise a request for that person.

We can check the available for and not available for for this, if the requested for has access or not acc to this. 

Need to figure out how this could work

Hi,

You need to discuss this requirement with your client.

Seems they are not clear on what they want

If user is able to see the form then it means that user has satisfied the user criteria

If the form has some variable based on which the form should be restricted from submission you should know the use cases when it is allowed and when submission is to be blocked.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

According to the requiremtnt if the Requested For user defined is not defined in the "available for" or defined as "not available for" an error message should pop up