You are viewing limited content. For full access, please sign in.

Question

Question

Setting Field Constraints

asked on January 22, 2014

I have a client wanting to have a field with 9 digits, and only 9 digits, with no formatting in a Tax ID field. I keep getting a error message saying, "The value provided failed to satisfy the constraint on the field. [9072]" 

 

I have tried various combinations of regular expressions in constraints and field formats as well as the field type and I keep getting this error. 

 

Maybe someone can tell me what I am doing wrong. Thank you

0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on January 22, 2014 Show version history

The only way I was able to get the 9072 error to come up is when I have an existing field that's not an integer or number type and I modify it by changing its type to number and then try to set a constraint on it.

 

With that being said, the constraint syntax for text fields and number fields are different. For your customer's scenario, it's best they use a text field with the constraint being \d\d\d\d\d\d\d\d\d.

 

When using a number field, the constraint is meant to enforce a range of values. See this page for more information.

1 0
replied on January 22, 2014

Thanks, I had to apply the change of the field type first and then it worked

2 0

Replies

replied on January 22, 2014 Show version history

Can you post what the current constraint is set to? Just setting it to \d\d\d\d\d\d\d\d\d should work.

0 0
replied on January 22, 2014

That's the exact constraint I set, what type of field should it be? I have tried Number as well as Text field types and they both return that error. 

 

Is it maybe that I am changing the field and not creating a new one? (This field was set up a half hour ago, so it's safe to do as I need for this)

0 0
replied on January 22, 2014

I would try it with a newly created field and see if you have the same error.

You are not allowed to follow up in this post.

Sign in to reply to this post.