<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>make field dependent on a multiple choice</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/432/make-field-dependent-on-a-multiple-choice</link><description>Hello, Having a bit of an issue with making a field dependent on a multiple choice field. Take for example 2 fields v_type (either single choice or multiple choice with values based on a dropdown list) v_detail -&amp;gt; this field should be dependent on v_type</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: make field dependent on a multiple choice</title><link>https://sugarclub.sugarcrm.com/thread/1361?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2016 14:52:01 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:a3662eb7-6eb8-4913-9c3c-a0d5b6627574</guid><dc:creator>Caim Astraea</dc:creator><description>&lt;p&gt;Hello o/&lt;/p&gt;&lt;p&gt;Indeed thanks&lt;span class="emoticon_happy emoticon-inline" style="height:16px;width:16px;"&gt;&lt;/span&gt; , linked to it only problem I had was with the underscore&amp;#39;s indexOf and checking for multiple conditions which I changed by extending the array prototype with a contains method&lt;/p&gt;&lt;p&gt;Array.prototype.contains = function ( needle ) { for (i in this) { if (this[i] == needle) return true; } return false; };&lt;/p&gt;&lt;p&gt;and checking for multiple conditions like&lt;/p&gt;&lt;pre class="javascript"&gt;if (this.model.get(&amp;#39;objectifs_c&amp;#39;).contains(&amp;quot;1&amp;quot;) ||this.model.get(&amp;#39;objectifs_c&amp;#39;).contains(&amp;quot;2&amp;quot;)&amp;nbsp; {
 $(&amp;#39;[data-name="v_list_brochure"]&amp;#39;).removeClass(&amp;quot;vis_action_hidden&amp;quot;).fadeIn().removeAttr(&amp;quot;style&amp;quot;);
 }
&lt;/pre&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p&gt;I&amp;#39;m using the keys instead of the name of the multi select options because those names can change over time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: make field dependent on a multiple choice</title><link>https://sugarclub.sugarcrm.com/thread/1360?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2016 10:51:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:d8201829-85ed-4772-b571-854ea98f0ae8</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;p&gt;Hi @Caim,&lt;/p&gt;&lt;p&gt;I ran into the same situation. I could not do that via the studio, and had to code it into the view.&lt;/p&gt;&lt;p&gt;Please, see this thread :&lt;/p&gt;&lt;p&gt;&lt;a href="https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/402/field-dependancy-display-a-textfield-dependant-from-a-custom-multi-enum"&gt;Field dependancy : display a textfield dependant from a custom multi-enum&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Hope this helps &lt;span class="emoticon-inline emoticon_wink" style="height:16px;width:16px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>