0 votes

Is it possible to use Regex to force a edit box parameter value to a specific format?

Forcing a user to input an alphanumeric as (###) ###-####

ago by (470 points)

1 Answer

0 votes
ago by (289k points)

Hello,

Unfortunately, there is no such possibility. However, thank you for the suggestion. We forwarded it to the corresponding department for consideration.

0

Is there a script that you are aware that can check the value of the field and then correct it with the necessary regex formatting?

0

Hello,

You can use an approach like the following with the below script in the If PowerShell script returns true condition. image.png

$regularExpression = "^[0-9]{3}\-[0-9]{3}$"
$Context.ConditionIsMet = "%param-myParameter%" -notmatch $regularExpression
0

I would prefer to not stop the action altogether. I suppose there isn't a way to rewrite the value in the script with the proper formatting? I am sure it's possible, but if that's programatically intensive I am fine researching on my own. Just didn't know if there were already existing conditions where you could pass the parameter value to another value and force it into compliance in between using regex.

Related questions

0 votes
1 answer

The use case we are looking for is providing a list of titles for users to choose from when initiating a re-hire. We already have a title property pattern established and would ... that we can manage the list in one place. Let me know and as always, thanks.

asked 6 hours ago by msheppard (470 points)
0 votes
1 answer

Hello, you helped us with a script to set the oof-message. Now we want to know, if it's possible to activate/deactivate the mail-forwarding option time-based. In the ... deactivate it accordingly on "param-abw-ende" Can you help me with that? Thanks Carsten

asked Nov 17, 2022 by lohnag (160 points)
0 votes
1 answer

Automation of user creation based on ServiceNow ticket creation.

asked Jan 24, 2022 by tdetmer (20 points)
0 votes
1 answer

I'd like to be able to either send an email report or export a CSV of all of the business rules carried out when a user is disabled. This would be ... Management Activity section but this includes things that weren't part of the disable operation. Thanks

asked Feb 19, 2020 by bavery (250 points)
0 votes
0 answers

Before Deactivation of an Account on the Webinterface our Help Desk need to change the AD User Description manually. Is it possible to force a manual change before deactivation ?

asked Feb 7, 2020 by lv01 (20 points)
3,547 questions
3,238 answers
8,232 comments
547,810 users