I have a problem with case insensitivity on text fields with [unique] validation. I'm trying to update "contractor" to "CONTRACTOR" in a text field, but ConfiForms apparently treats text the same whether it is upper or lower case, at least with the [unique] validation. Does anyone know a way to disable case insensitivity or (same thing) enable case sensitivity?
Sorry. This was supposed to be a reply.
Hi
ConfiForms rule to validate uniqueness can be set to be case insensitive
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The opposite is occurring. This is my code:
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="5b7f96d6-fe99-4134-b81c-7fe44091517f" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">title</ac:parameter>
<ac:parameter ac:name="fieldLabel">Title</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
<ac:parameter ac:name="validation">[unique]</ac:parameter>
</ac:structured-macro>
</p>
I want it to be the default, CASE SENSITIVE. However, when I add "CONTRACTOR" from my ConfiForm registration, I get a validation error, because "contractor" is already being used as a title. The it gets rejected because it is NOT unique, which tells me that it's CASE INSENSITIVE.
Thank you.
-Kathleen Janiszewski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at the idea I have shared - using a different method (field definition rule type) to check the uniqueness...
I dont know how to "fix" yours, sorry
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
I got rid of [unique] and added the field definition rule, and I got the same results: I couldn't add a user with the title of "TESTING" because there was already one with the tile of "testing" . Moreover, I couldn't change a user's title from "testing" to "TESTING". But I could change it from "testing" to "testing 1-2-3", then change it from "testing 1-2-3" to "TESTING".
I can provide screenshots if you'd like.
Kind regards,
-Kathleen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
Thank you for the video. I would record one if I could. Here are some screenshots in order:
1) Notice the Validate Uniqueness rule with Case Insensitive UNCHECKED:
2) I change "TESTING":
to "testing":
3) This runs the update.action REST API call, and returns the following error which I (really another colleague's code originally) put into an alert:
Again, this works fine if I first change it to "testing 1-2-3" then to "testing".
Kind Regards,
-Kathleen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could it be that there is some other rule in the form that interferes?
Try recreating an example I have shared - does it work for you?
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
I have not created anything that simple.
There are many rules, but not on the "title" field. Also, it's an update.action, so there's only 1 field changing. I checked my code. I never use "upper" or "lower" anywhere. Could it be that it only happens with the REST API?
Kind regards,
-Kathleen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
I tried it your way. In order to get the registration macro to work, I had to remove [unique] from the Form Field Definition, but keep the Rule for Form Field Definition on the "title" field. However, it STILL DOES NOT WORK with the REST API! I get the error I show above. I need it to work in ALL cases. How do I do that?
Kind Regards,
-Kathleen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What macro you have that has that "message"? I afraid this has nothing to do with the method I shared... (something else is conflicting)
My solution/example works with UI and with REST API... there is no difference
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
It works fine with the UI on the add. However, then I use the REST API within the IFTTT macro, and I get multiple results, both "TESTING" and "testing" on the filter.action. Since I must have a one-to-one correspondence, my code throws an error when the filter action returns mutliple results.
Thanks again.
-Kathleen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using the https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Server+REST+API+version+1#ConfiFormsServerRESTAPIversion1-UpdateConfiFormsFieldvaluebyfilter API endpoint to update your field's value?
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
Actually, we use version 0:
https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Server+REST+API+version+0
However, my colleague came up with a solution that our customer is ok with. We're going to force upper case in that field. I already trim() it everywhere, so adding UPPER()/toUpperCase() should be pretty straightforward.
Thank you for your help!
-Kathleen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.