I had an interesting question posed to me recently. The customer was using a Model Driven app and wanted to format a 10-digit number as a phone number. I thought sure, create a JavaScript web resource and have it do its jazz after the user entered the 10-digit number prior to submission of the record.
The customer requested we use no code because they have a strict process for checking in code. So I suggested the following.
- Create a Power Automate flow that runs when a record is created or updated
- Write the following formula into phone number field:
concat('(', substring(triggerBody()?['text'], 0, 3), ') ', substring(triggerBody()?['text'], 3, 3), '-', substring(triggerBody()?['text'], 6, 4))

Configuration of flow

