http://ofbiz.116.s1.nabble.com/Dev-how-to-set-entity-constraint-for-null-values-in-form-def-tp167666p167668.html
David E. Jones wrote:
> This is fairly trivial actually. Just use the "null" variable that is sitting in the environment rather than a value which ends up as an empty String. In other works instead of value="" use env-name="null".
>
> -David
>
>
> Jacopo Cappellato wrote:
>> Hi all,
>>
>> in form widget, is there a way to select records
>>
>> I need to define the following selection for a drop-down field in a form
>> widget:
>>
>> "select * from CostComponentType where parentTypeId is null"
>>
>> This is what I've tried to do:
>>
>> <field name="costComponentTypeId">
>> <drop-down allow-empty="false">
>> <entity-options entity-name="CostComponentType"
>> description="${description}">
>> <entity-constraint name="parentTypeId" operator="equals" value=""/>
>> </entity-options>
>> </drop-down>
>> </field>
>>
>> Unfortunately this doesn't seem to work (the constraint is ignored)...
>> can you help me?
>>
>> Thanks,
>>
>> Jacopo
>>
>> _______________________________________________
>> Dev mailing list
>>
[hidden email]
>>
http://lists.ofbiz.org/mailman/listinfo/dev>
> _______________________________________________
> Dev mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/dev>