What is the way to enforce that a user can only insert unique values for a certain field in a custom list? [EOM]

LabKey Support Forum (Inactive)
What is the way to enforce that a user can only insert unique values for a certain field in a custom list? [EOM] Leo Dashevskiy  2015-10-28 15:36
Status: Closed
 
Ok, thanks, Jon. Nice approach with enumeration.

More questions on lists.
Is it possible to apply custom views to them?
Like how it's described here: https://www.labkey.org/wiki/home/Documentation/page.view?name=addCustomQueryView

I have a file located at <moduleName>/queries/lists/Studies/test.qview.xml with contents
<customView xmlns:cv='http://labkey.org/data/xml/queryCustomView'>
    <columns>
        <column name='name'/>
        <column name='id'/>
    </columns>
    <sorts>
        <sort column='id' descending='true'/>
    </sorts>
</customView>

The list definition contains fields named 'name' and 'id'.
Its name is "Studies".

But I'm not seeing the custom view 'test' in the drop-down for the Views.

I can apply, of course, a UI based sort to the specified column via the "Customize View" UI.

I also have a <moduleName>/queries/lists/Studies.query.xml file with contents:
<?xml version='1.0' encoding='UTF-8'?>
<query name='Studies' schemaName='lists' xmlns='http://labkey.org/data/xml/query'>
    <description>
        List all of the studies available starting with 'SDY'.
    </description>
</query>

But that description does not show up next to the list in the Query Browser, may be, it's not supported?


By the way, speaking of lists fields in particular (I haven't verified it for other cases, such as dataset definitions), I noticed 2 behaviors, which are, I felt, inconvenient/confusing to the user (they were to me at least).

1. when specifying a RegEx validator, one clicks the "Add..." button, a pop up shows up prompting to enter details, one starts to enter them, then hovers the mouse pointer over the question mark next to the "Regular Expression*" to get an idea about the flavor/syntax of the RegEx used, where one sees the "Pattern" link to the Java's class, but after clicking it, opening it in a new tab/window, the pop up with all of the information entered for the RegEx validator disappears, clicking the "Add..." button again bring up a new/empty pop-up

2. once there is a RegEx validator in place, when examining it: clicking the field, then the "Validators" tab, immediately there are no UI elements for editing/deleting the RegEx; one has to click on a different field (if one is present), then back to the field in question, then the 2 icons for editing and deleting show up. A screenshot of them not showing up is attached.