Require input length for entity primary key

Phone number is the primary key. Is there a way to require 10 characters on input?

yes
image
##########

I have the mask as (###) ###-#### but the entry accepts inputs less than 10 characters

Thats just mask for format.
Would creating entity via automation with prompt for primary field be an option?

It could be, but after redoing a huge chunk of automation I can’t be arsed to roll a custom entity screen for all of that right now. Maybe at some point in the future.

Does regex not work in format field?

Didn’t seem to work

2021-01-12_21;39_1610509192_Samba.Presentation

1 Like

0000000000 should work

0 Digit, required. This element will accept any single digit between 0 and 9.

2 Likes

Thanks Mark. Though it only allows integer 0-9 entry, one is still able to continue with less than 10 integers entered.

2021-01-13_10;18_1610554729_%pn

We’re trying to avoid this with lazy input by employees:

2021-01-13_10;21_1610554908_Samba.Presentation

I’m thinking JTR’s suggestion may be the only way.

Maybe validate entity selected event with a check on primary field length and prompt to update if wrong?
May put short in but forced to correct when selecting new entity?

1 Like

Were you able to solve this?

No I haven’t. At some point the onus needs to be on the user for inputting the proper information. That and I’ve been too lazy.

As I suggested you could change flow to create via automation with ?prompts and validate the entered values before creating entity.

Any examples or tutorials by any chance?

Not that wouldn’t be me searching forum like anyone else.

You would have button to start flow.
Using split flow an execute command action with [?prompt] for command value, asking the entity email you want to check.
Then the 2nd rule triggered by that action validates command value and its actions include the actions to create the entity.

Alternatively a script would be cleaner depending on you abilities in samba.

One topic that comes to mind was the hotel room entity topic from a while back. That manages entities with automation.