Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make mandatory field if we select a specific value in picklist
#2
Hello  Omar,


I think that what you are asking for, can be done using a Validations Map. You can use an Expression for making the field mandatory or if you need to do more complicated validations go on creating a custom function.


I'm writing you here a simple example where an expression is used to make mandatory the field Codice Fiscale when the picklist field  Natura Fiscale contains the value "Ditta Individuale"


Validation Map


<map>
<originmodule>
<originname>Accounts</originname>
</originmodule>
<fields>
<field>
<fieldname>naturafisc_account</fieldname>
<validations>
<validation>
<rule>expression</rule>
<restrictions>
<restriction>Make_CF_Mandatory</restriction>
</restrictions>
</validation>
</validations>
</field>
</fields>
</map>






Expression Map (Make_CF_Mandatory)



<map>

    <expression>if ($(account_id : (Accounts) naturafisc_account)  == 'Ditta Individuale')  then (if ($(account_id : (Accounts) codice_fiscale) != '' or account_id : (Accounts) codice_fiscale) != 0) then 1 else 0 end) else 0 end</expression>
</map>





Let me know if this helps


Elisa
Reply


Messages In This Thread
RE: Make mandatory field if we select a specific value in picklist - elisa.deko - 07-11-2019, 03:30 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)