You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by madhu <ma...@lntinfotech.com> on 2012/05/31 11:07:33 UTC

Re: populate the drop down field with values from another field

how to get the values into the dropdown with some 'where' condition.
ex:
<entity entity-name="Weightageaccord" 
                      title="Weightage Entity">
      <field name="TypeId"  type="id-ne"></field>
      <field name="TypeName" type="name"></field>
 <field name="Weightage" type="numeric"></field>
          <prim-key field="TypeId"/>
     </entity>

here i want to load typename into the dropdown where Weightage is null. how
to mention this where condition in 

<drop-down allow-empty="false">
<entity-options description="${TypeName}"  
key-field-name="TypeName" entity-name="Weightageaccord">										
</entity-options>
</drop-down>

--
View this message in context: http://ofbiz.135035.n4.nabble.com/populate-the-drop-down-field-with-values-from-another-field-tp2296885p4632844.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: populate the drop down field with values from another field

Posted by madhu <ma...@lntinfotech.com>.
thank you ankush

In entity-constraint tag there is another attribute ignore-if-null. 
initialize it by false. 

is working fine.

--
View this message in context: http://ofbiz.135035.n4.nabble.com/populate-the-drop-down-field-with-values-from-another-field-tp2296885p4632857.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: populate the drop down field with values from another field

Posted by Ankush Upadhyay <an...@hotwaxmedia.com>.
Hello,

Use entity-constraint tag
like
<drop-down allow-empty="false">
<entity-options description="${TypeName}"
key-field-name="TypeName" 
entity-name="Weightageaccord">><entity-constraint name="Weightage" 
value="null"/>
</entity-options>
</drop-down>

Or

In entity-constraint tag there is another attribute ignore-if-null. 
initialize it by false.

On 05/31/2012 02:37 PM, madhu wrote:
> how to get the values into the dropdown with some 'where' condition.
> ex:
> <entity entity-name="Weightageaccord"
>                        title="Weightage Entity">
>        <field name="TypeId"  type="id-ne"></field>
>        <field name="TypeName" type="name"></field>
>   <field name="Weightage" type="numeric"></field>
>            <prim-key field="TypeId"/>
>       </entity>
>
> here i want to load typename into the dropdown where Weightage is null. how
> to mention this where condition in
>
> <drop-down allow-empty="false">
> <entity-options description="${TypeName}"
> key-field-name="TypeName" entity-name="Weightageaccord">										
> </entity-options>
> </drop-down>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/populate-the-drop-down-field-with-values-from-another-field-tp2296885p4632844.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

-- 
Thanks&  Regards
Ankush Upadhyay
ankush.upadhyay@hotwaxmedia.com