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 ?
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 ?
Comment