In CSI I have created a new UET. I want to check if the contents of the field are unique. How do I do this?
I am looking through the validators but nothing is jumping out at me.
It looks like you can do this in the SQL Tables form as well.
SaaS customer - no access to database. I need to do the same thing - make sure a UET is a unique value. Anyone have a solution for this?
I did a quick experiment based on what was posted here & it might work:
I created a test UET (nvarchar 10) and attached it to my UserNames table. Applied schema etc. I then launched the "SQL Tables" form and loaded up the UserNames table, verifying that the UET field is present. I then chose "New Constraint", type Index, Unique only. On the next screen, I added my UET field.
My problem is my test crashes as all the field values are NULL, which violates the UNIQUE constraint.
It looks like this might work, but I can't test any further.
Being SaaS and lacking db access may not allow for that.
One thought that occurs would be to write a form script method that would take the value entered and read the IDO in question with whatever other key information would be needed to determine a unique value, using an idoclient request. Return only the UET property and only one record. If you get a record returned, you know the value isn't unique. Return a negative 1 for a found record, zero for no record found.
Hook this form script up to a validator and it should work to do what you need. Granted, not the most efficient way to go about it, if it works. To be fair, I've not had a chance to test this thought out...
If the value can be updated by a background process of some kind, like an AES event, this obviously won't work.