Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Custom operationBinding breaks isUnique validator?

    Using: SmartClient_v110p_2017-05-15_PowerEdition

    Found some unexpected datasource behavior today. I had a datasource bound to a form where I was using form.checkForValidationErrors() along with some isUnique conditions to test whether I wanted to add the form's contents to my table. This was working nicely until I added a custom fetch operationBinding to be used to populate a ComboBox list in another form. I'm getting unknown column errors and the validators seem to be using the custom fetch operation instead of the default.

    This validator works:


    <field name="hrsPersonID" type="text" length="8" title="Person ID in HRS" columnCode="63e57407f6ef6cc5622ce4dae01295f4">
    <validators>
    <Validator>
    <type>isString</type>
    <stopIfFalse>true</stopIfFalse>
    <typeCastValidator>true</typeCastValidator>
    </Validator>
    <Validator>
    <type>isUnique</type>
    <stopIfFalse>true</stopIfFalse>
    <typeCastValidator>true</typeCastValidator>
    </Validator>
    </validators>
    </field>

    Until I add:

    <operationBindings>
    <operationBinding operationType="fetch" operationID="supervisorList">
    <criteria fieldName="isFolder" value="1" operator="equals"/>
    <groupBy>id_People</groupBy>
    <groupBy>lastFirst</groupBy>
    </operationBinding>
    </operationBindings>

    which causes the isUnique validator to always fail with unknown column.

    So is there a way to tell the DS to use the default fetch behavior except when a component specifies fetchOperation: by operationID ?

    #2
    Try replacing operationID with operationId. To SmartClient it looks like the default fetch.

    Comment


      #3
      I've made the replacement, but no joy with:

      <operationBindings>
      <operationBinding operationType="fetch" operationid="supervisorList">
      <criteria fieldName="isFolder" value="1" operator="equals"/>
      <groupBy>id_People</groupBy>
      <groupBy>lastFirst</groupBy>
      </operationBinding>
      </operationBindings>

      I'm still getting unknown column errors:

      errorMessage: "Unknown column 'people.null'

      Comment


        #4
        Check your capitalization again.

        Comment


          #5
          That seems to work.

          Thanks.

          Comment

          Working...
          X