<?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>Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/402/field-dependancy-display-a-textfield-dependant-from-a-custom-multi-enum</link><description>Hello there ! i&amp;#39;m building a new project under Sugar Pro 7.5.2 and i&amp;#39;m meeting some difficulties : What i have and what i would like : I have created a muliple choices dropdown, and a textfield. I would like to display the textfield only if the user choses</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/22599?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 14:56:32 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:8af56a17-974e-45c9-862c-6de7e4c002cc</guid><dc:creator>Divakar N</dc:creator><description>&lt;p&gt;I am new to sugarCRM. Recently I have searched for the same solution and google drop me here. I tried the above solutions but they are working for only dropdown field. Since, sugar logic is not working for multiselect field dependency. Multiselect field dependency keeps values as Objects. SO, by converting it into array and iterating the array we can find&amp;nbsp;whether the multiselect field contains our required value or not.&lt;/p&gt;
&lt;p&gt;I know this this is very late but this will be helpful for the future readers like me.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;//solutions_c is Multiselect field
//revenue_c is Textfield

initialize: function(options) {
    this.plugins = _.union(this.plugins || [], [&amp;#39;HistoricalSummary&amp;#39;]);
    this._super(&amp;#39;initialize&amp;#39;, [options]);

    //declare onChange
    this.model.on(&amp;quot;change:solutions_c&amp;quot;, this.SolutionsOnChange, this);
},

SolutionsOnChange: function(){
    var solutionsField = this.model.get(&amp;#39;solutions_c&amp;#39;).toString();
    var flag = 0; //set flag as 0
    //exploid by (,)
    var solutionsArray = solutionsField.split(&amp;quot;,&amp;quot;);
    for(var i = 0; i &amp;lt; solutionsArray.length; i++ ){
        if(solutionsArray[i] == &amp;quot;Electronics&amp;quot;){
            flag = 1; //set flag as 1
        }
    }
    if(flag == 1){
        $(&amp;#39;[data-name=&amp;quot;revenue_c&amp;quot;]&amp;#39;).css(&amp;#39;visibility&amp;#39;, &amp;#39;visible&amp;#39;);
    }
    else{
        $(&amp;#39;[data-name=&amp;quot;revenue_c&amp;quot;]&amp;#39;).css(&amp;#39;visibility&amp;#39;, &amp;#39;hidden&amp;#39;); 
    }
},&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; &lt;br /&gt; Thank you,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12736?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 17:32:26 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:ed69b9d4-bfb3-4763-b722-78f57f7ee0c1</guid><dc:creator>Yury Voloshin</dc:creator><description>&lt;p&gt;I worked on exactly the same issue in Sugar 9.2. We have a multi-select field in the Meetings module where one of the choices is &amp;quot;Other&amp;quot;. A text field had to be displayed when &amp;quot;Other&amp;quot; is one of the selections. First, I set it up as shown by &lt;a href="https://sugarclub.sugarcrm.com/members/gaellefernandez"&gt;Gaelle Fernandez&lt;/a&gt;, using the &amp;quot;.hide&amp;quot; and &amp;quot;.show&amp;quot; methods. This worked to some degree, but not well enough. When the multiselect options were initially entered, the text field would not open when &amp;quot;Other&amp;quot; was selected. Instead, the text field would show a message on mouse-over: &amp;quot;This field is locked because it is involved in a running process&amp;quot; (see image). But, if I saved the meeting and then edited it, the text field would open when &amp;quot;Other&amp;quot; was selected, as expected. When I replaced &amp;quot;.hide&amp;quot; and &amp;quot;.show&amp;quot; with &amp;quot;.removeClass&amp;quot; and &amp;quot;.addClass&amp;quot;, as shown by &lt;a href="https://sugarclub.sugarcrm.com/members/caim"&gt;Caim Astraea&lt;/a&gt;, everything started to work as expected. Thank you all!&lt;/p&gt;&lt;p&gt;&lt;a href="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/ebd788dd_2D00_36b2_2D00_4f60_2D00_8ce3_2D00_a89e45bda7f5-3525-complete/25348_5F00_locked_2B00_meeting_2B00_field.png"&gt;&lt;img alt=" " src="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/ebd788dd_2D00_36b2_2D00_4f60_2D00_8ce3_2D00_a89e45bda7f5-3525-complete/25348_5F00_locked_2B00_meeting_2B00_field.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12735?ContentTypeID=1</link><pubDate>Mon, 07 Mar 2016 17:16:02 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:2dcae103-bd78-48d9-9ea2-682dde72d50f</guid><dc:creator>Caim Astraea</dc:creator><description>&lt;p&gt;Sorry if it seems out of place , thought to keep the discussion linked since I&amp;#39;m building on this.&lt;/p&gt;&lt;p&gt;Anyone figured out how to style things as closely as possible to sugarcrm default behaviour ( dependent field ) . for .show and hide ?&lt;/p&gt;&lt;p&gt;Tried multiple things such as addClass(&amp;quot;hide&amp;quot;) instead of .hide and removeClass(&amp;quot;hide&amp;quot;).&lt;/p&gt;&lt;p&gt;, searched the style guide but couldn&amp;#39;t find it. Basically the rows will collapse and the other field will take full width if there&amp;#39;s more than 1 on the same row and one of them shows as hidden. This doesn&amp;#39;t happen on dependent fields. &lt;a href="http://recordit.co/5RhdvenQFD" rel="nofollow" target="_blank"&gt;Recordit: Record screencasts fast &amp;amp; free! with GIF Support!&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;UPDATE &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It seems to be the vis_action_hidden class so my code now looks something like : However can&amp;#39;t get that pink coloured fade-in effect. &lt;/p&gt;&lt;pre class="javascript"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(this.model.get(&amp;#39;objectifs_c&amp;#39;).contains(&amp;quot;12&amp;quot;) ) { //programation action commerciale
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&amp;#39;[data-name="v_liste_actionco"]&amp;#39;).removeClass(&amp;quot;vis_action_hidden&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&amp;#39;[data-name="v_liste_actionco"]&amp;#39;).addClass(&amp;quot;vis_action_hidden&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/pre&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12734?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2015 12:16:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:002538e5-1987-4ae2-b62d-5e49b5299965</guid><dc:creator>EvilPeri EvilPeri</dc:creator><description>&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;a href="https://community.sugarcrm.com/#"&gt;GaelleFernandez&lt;/a&gt;&lt;span&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;This is just a tip for when you are hiding elements. It is better to unset the value as you hide the field so that when you save any lingering values are not kept.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;so in your case&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;$(&amp;#39;[data-name="YourTextField"]&amp;#39;).hide();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;this.model.set(&amp;#39;YourTextField&amp;#39;,null); //just add this line, it can be null, zero, blank whichever you want just unset the value.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;delete this.model.attributes['YourTextField'] //this is optional and you can add this if you really want to remove the key value pair&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12733?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 17:00:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:558be9dd-ebb6-4d52-bd92-ecc05ea5db89</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;WELL !&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;We got the solution here !&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;This is the end, i have the solution to all my questions about how display/hide a textfield dependantly from a multi-select field !&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;And that is Thanks to @Ruben Recacha, @Rolustech and @EvilPery !&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;In &lt;/span&gt;&lt;strong&gt;custom/modules/YOURMODULE/clients/base/views/record/record.js&lt;/strong&gt;&lt;span&gt; :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;({&amp;nbsp; &amp;nbsp; extendsFrom: &amp;#39;RecordView&amp;#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; initialize: function(options) {&lt;br /&gt;&amp;nbsp; this._super(&amp;#39;initialize&amp;#39;, [options]);&lt;br /&gt;&amp;nbsp; this.on(&amp;quot;render&amp;quot;, this.displayFunction, this);//launch it whenever your page is rendered&lt;br /&gt;&amp;nbsp; this.model.on(&amp;quot;change:YourMultiSelect&amp;quot;,this.displayFunction, this);//display changes when the multi select change&lt;br /&gt;&amp;nbsp; &amp;nbsp; },&lt;br /&gt; displayFunctiondisplayDetailsScoring:function(){&lt;br /&gt;&amp;nbsp; if (_.indexOf(this.model.get(&amp;#39;YourMultiSelect&amp;#39;), &amp;quot;others&amp;quot;) === -1){&lt;br /&gt;&amp;nbsp;&amp;nbsp; $(&amp;#39;[data-name="YourTextField"]&amp;#39;).hide();&lt;br /&gt;&amp;nbsp; }else{&lt;br /&gt;&amp;nbsp;&amp;nbsp; $(&amp;#39;[data-name="YourTextField"]&amp;#39;).show();&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;},&lt;br /&gt;}) &lt;/pre&gt;&lt;span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;To do it on the create page, you just have to copy/paste this code to &lt;/span&gt;&lt;strong&gt;custom/modules/YOURMODULE/clients/base/views/create-actions/create-actions.js&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;and replace&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;({&amp;nbsp; &amp;nbsp; extendsFrom: &amp;#39;RecordView&amp;#39;,&lt;/pre&gt;&lt;br /&gt;&lt;span&gt;by :&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;({&amp;nbsp; &amp;nbsp; extendsFrom: &amp;#39;CreateActionsView&amp;#39;,&lt;/pre&gt;&lt;br /&gt;&lt;span&gt;And that is all ! :)&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;So, thanks again to @Rolustech, @EvilPeri and @Ruben, they give me clues, they give me information, they rocks :)&lt;/strong&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12732?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 16:44:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:7a890943-9851-47a9-99c7-07a67654a9ea</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;THANKS SO MUCH @Ruben !&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;By putting the render, and by copying my code in create-actions.js, i finally did it ! My final code&amp;nbsp; in the next response :)&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12731?ContentTypeID=1</link><pubDate>Sun, 31 May 2015 13:10:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:e85a5625-d12e-48cf-9fe9-30d5796ca191</guid><dc:creator>Rub&amp;#233;n Recacha Camacho</dc:creator><description>&lt;span&gt;Hi Gaelle,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;1- Could you show us create-actions content file?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;2- You have to put into initialize() function this code:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;this.on(&amp;quot;render&amp;quot;, this.&amp;lt;function_name&amp;gt;, this);&lt;/pre&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Rub&amp;eacute;n Recacha.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Consultant REDK Software Engineering&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12730?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 13:34:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:fdb8f3b5-e2f5-4f12-b4b2-a84cea4f9562</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;Thanks to both of you @EvilPeri and @Rolsutech, i&amp;#39;ve made it work, but i still have some questions :&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Here is the code i&amp;#39;ve wrote in record.js :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;({&amp;nbsp; &amp;nbsp; extendsFrom: &amp;#39;RecordView&amp;#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; initialize: function(options) {&lt;br /&gt;&amp;nbsp; this._super(&amp;#39;initialize&amp;#39;, [options]);&lt;br /&gt;&amp;nbsp; /*OnChange on multi-select fields for scoring*/&lt;br /&gt;&amp;nbsp; this.model.on(&amp;quot;change:scoring_2_roues_c&amp;quot;,this.Change2Roues, this);&lt;br /&gt;&amp;nbsp; &amp;nbsp; },&lt;br /&gt;Change2Roues: function(){&amp;nbsp; if (_.indexOf(this.model.get(&amp;#39;scoring_2_roues_c&amp;#39;), &amp;quot;sautr&amp;quot;) == -1){&lt;br /&gt;$(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).hide(); //Autres n&amp;#39;est pas s&amp;eacute;lectionn&amp;eacute;&lt;br /&gt;}else{&lt;br /&gt;$(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).show(); //Autres est s&amp;eacute;lectionn&amp;eacute;&lt;br /&gt;}&lt;br /&gt;&amp;nbsp; &amp;nbsp;},&lt;br /&gt;})&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;span&gt;It works great.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Now here are my 2 questions :&lt;/span&gt;&lt;br /&gt;&lt;span&gt;- It works only when the user is editing a Lead (which has already been created). I have tried to add this code in custom/modules/Leads/clients/base/views/create-actions/create-actions.js, but it does not load when a user is creating a lead...&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Do you have any idea on how to achieve this ?&lt;/strong&gt;&lt;br /&gt;&lt;span&gt;- As you can see, the event is the &amp;quot;onchange&amp;quot; on scoring_2_roues_c, but i would like the detail_scoring_2_roues_c to hide (still depending upon scoring_2_roues_c &amp;#39;s values) when the page is launched, so i will have to write some code as the page launch. &lt;/span&gt;&lt;strong&gt;Which event do i have to use ? How should i call the function ?&lt;br /&gt;&lt;br /&gt;Again, thanks a lot to you, because with your help, i&amp;#39;m making huge improvement !&lt;/strong&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12728?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 12:51:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:8a6c7b2f-8ff2-4315-9a8f-7891fd9f711c</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;Thanks a lot again @EvilPeri, that is a good thing to know :)&lt;/span&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12729?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 12:51:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:2f76a89a-2e24-4ef5-b212-5b58283dc076</guid><dc:creator>EvilPeri EvilPeri</dc:creator><description>&lt;span&gt;actually&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Rolustech&amp;#39;s&amp;nbsp;&lt;/strong&gt;&lt;span&gt;code snippet above works fine when it is first displayed but i think moving the event listener to the&amp;nbsp;bindDataChange method, or as a last resort if that still doesnt work then what you could do is add the event listener to the _render/render method&lt;/span&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12727?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 12:44:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:cd437ca8-af01-4405-82ca-619c49ea615e</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;thanks a lot @EvilPeri, that &amp;#39;s really good to know :)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Another question : i want to hide/show the textfield everytime the multi-select changes. It don&amp;#39;t seem to be the case currently. Do i have to do some ajax ?&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12726?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 12:27:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:f4f597e5-74ce-45e2-80ed-fd09f6897b30</guid><dc:creator>EvilPeri EvilPeri</dc:creator><description>&lt;span&gt;The one stored on your model is the values the labels can be accessed via&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;app.metadata._dev_data.app_list_strings['&amp;lt;your listname here&amp;gt;']&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12725?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 12:22:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:7528dc7e-a30d-4413-8050-fe0364eaa8fa</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;Well, first of all, &lt;/span&gt;&lt;strong&gt;Thanks a lot @Rolustech&lt;/strong&gt;&lt;span&gt; for your patience, and yes, i had run a Quick Repair (that is the first thing you learn about Sugar, haha !), and thanks a lot, you put me on the right tracks !&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;@EvilPeri&lt;/strong&gt;&lt;span&gt;, thanks a lot too, I did not know how worked the multi-select field, and that was the first question i was wondering myself. You put me on the right tracks too !&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Because you have some knowledge on multi-select, &lt;/span&gt;&lt;strong&gt;do you know wich part of the list is in the array/object &lt;/strong&gt;&lt;span&gt;? i mean, are they the value or the labels ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;And yes &lt;/span&gt;&lt;strong&gt;@Maira Jessy&lt;/strong&gt;&lt;span&gt;, I love to discuss about Sugar like this, i always learn new tricks and improve my code with such people, who has the will to share their knowledges :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;For the moment, i haven&amp;#39;t got the total solution, but i will digg some more, and i&amp;#39;m sure it is not that far away :)&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12724?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 11:37:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:2516425f-987d-4de2-b691-6ac85149651b</guid><dc:creator>EvilPeri EvilPeri</dc:creator><description>&lt;span&gt;Regarding the condition i&amp;#39;ve interchanged the placement (sorry for that&amp;nbsp; :| ) anyway on the &amp;quot;if&amp;quot; condition is sautr is not selected and the&amp;nbsp; &amp;quot;else&amp;quot; when it is&lt;/span&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12722?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 11:28:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:70579e24-e647-440b-a8f1-988903fb59f8</guid><dc:creator>EvilPeri EvilPeri</dc:creator><description>&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;a href="https://community.sugarcrm.com/#"&gt;GaelleFernandez&lt;/a&gt;&lt;span&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Rolustech&amp;#39;s solution should work. But i think your condition is incorrect, the multi-select field contains an array or an object so for the condition you could do something like&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp;if (_.indexOf(this.model.get(&amp;#39;scoring_2_roues_c, &amp;quot;sautr&amp;quot;) == -1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).hide(); //sautr is&amp;nbsp;selected&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).show(); //sautr is not selected&lt;/pre&gt;&lt;br /&gt;&lt;span&gt;Hope this helps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12723?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 11:28:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:60af2513-983d-476a-b79b-1a966dadb9c4</guid><dc:creator>EvilPeri EvilPeri</dc:creator><description>&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;a href="https://community.sugarcrm.com/#"&gt;GaelleFernandez&lt;/a&gt;&lt;span&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Rolustech&amp;#39;s solution should work. But i think your condition is incorrect, the multi-select field contains an array or an object so for the condition you could do something like&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp;if (_.indexOf(this.model.get(&amp;#39;scoring_2_roues_c, &amp;quot;sautr&amp;quot;) == -1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).hide(); //sautr is&amp;nbsp;selected&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).show(); //sautr is not selected&lt;/pre&gt;&lt;br /&gt;&lt;span&gt;Hope this helps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12721?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 09:33:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:3dbe72ee-69bf-4fc8-b180-98642fcf6060</guid><dc:creator>Rolustech Rolustech</dc:creator><description>&lt;span&gt;Certainly it is :). We are glad to be of help.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Rolustech: SugarCRM Engineering&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Website:&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.rolustech.com/" rel="nofollow" target="_blank"&gt;www.rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Ph (US): +1 - 310 - 492 - 5564&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Ph (UK): +44 - 207 - 9938 - 524&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Email:&amp;nbsp;&lt;/span&gt;&lt;a href="mailto:info@rolustech.com"&gt;info@rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Skype: rolustech&lt;/span&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12720?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 09:28:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:6748288a-3d29-4304-bab8-415968ea4a69</guid><dc:creator>Maira jassy</dc:creator><description>&lt;span&gt;This is very nice to discuss and share very useful source of information it will really help people thanks ...&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12719?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 08:56:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c4085fae-714f-465a-a171-20ca46874ab1</guid><dc:creator>Rolustech Rolustech</dc:creator><description>&lt;span&gt;Did you run repair n rebuild afterwards?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Rolustech: SugarCRM Engineering&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Website:&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.rolustech.com/" rel="nofollow" target="_blank"&gt;www.rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Ph (US): +1 - 310 - 492 - 5564&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Ph (UK): +44 - 207 - 9938 - 524&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Email:&amp;nbsp;&lt;/span&gt;&lt;a href="mailto:info@rolustech.com"&gt;info@rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Skype: rolustech&lt;/span&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12718?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 17:18:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5a283b7b-4c04-4812-80c8-19124bfdde2f</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;I&amp;#39;ve moved my record.js file, and removed the comment block, but there is not much improvement.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;it seems that Sugar does not even consider my file.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;i&amp;#39;ve added a little&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;console.log(&amp;quot;we are overriding record&amp;quot;); into the initialize function, but even that is not showing.. &lt;/pre&gt;&lt;span&gt;If you have any help, i&amp;#39;ll be glad to hear it :)&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12717?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 16:52:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:dd94c2d1-73d6-45e3-bb3d-e56d0032c794</guid><dc:creator>Rolustech Rolustech</dc:creator><description>&lt;span&gt;We have tested this code snippet with multi select dropdown, please remove the block comment from your code and the correct path should be custom/modules/Leads/clients/base/views/record/record.js.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Rolustech: SugarCRM Engineering&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Website:&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.rolustech.com/" rel="nofollow" target="_blank"&gt;www.rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Ph (US): +1 - 310 - 492 - 5564&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Ph (UK): +44 - 207 - 9938 - 524&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Email:&amp;nbsp;&lt;/span&gt;&lt;a href="mailto:info@rolustech.com"&gt;info@rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Skype: rolustech&lt;/span&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12716?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 16:40:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:aa23ae27-036f-4ee5-869d-57d839b82e61</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;Well, @Rolustech, i think in fact your solution works for simple dropdown, but not for multi select dropdown ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Or maybe i&amp;#39;m wrong ? here is my code, (with scoring_2_roues_c being the dropdown and detail_scoring_2_roues_c being my text field to hide).&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;({&amp;nbsp; &amp;nbsp; extendsFrom: &amp;#39;RecordView&amp;#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; initialize: function(options) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /*this.plugins = _.union(this.plugins || [], ['HistoricalSummary']);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._super(&amp;#39;initialize&amp;#39;, [options]);*/&lt;br /&gt;&amp;nbsp; this.model.on(&amp;quot;change:scoring_2_roues_c&amp;quot;,this.CustomOnChange, this);&lt;br /&gt;&amp;nbsp; &amp;nbsp; },&lt;br /&gt; CustomOnChange: function(){&lt;br /&gt;&amp;nbsp; &amp;nbsp;var scorValue=this.model.get(&amp;#39;scoring_2_roues_c&amp;#39;);&lt;br /&gt;&amp;nbsp; &amp;nbsp;alert(scorValue);&lt;br /&gt;&amp;nbsp; &amp;nbsp;if (scorValue == &amp;quot;sautr&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).hide();&lt;br /&gt;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(&amp;#39;[data-name="detail_scoring_2_roues_c"]&amp;#39;).show();&lt;br /&gt;&amp;nbsp; &amp;nbsp;},&lt;br /&gt;})&lt;/pre&gt;&lt;br /&gt;&lt;span&gt;And i put it in custom/modules/Leads/clients/views/record/record.js&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12715?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 16:30:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5affa252-35b2-4be7-aa6b-bcdfb57a403c</guid><dc:creator>Rolustech Rolustech</dc:creator><description>&lt;span&gt;It was a pleasure. :).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Rolustech: SugarCRM Engineering&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Website:&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.rolustech.com/" rel="nofollow" target="_blank"&gt;www.rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Ph (US): +1 - 310 - 492 - 5564&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Ph (UK): +44 - 207 - 9938 - 524&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Email:&amp;nbsp;&lt;/span&gt;&lt;a href="mailto:info@rolustech.com"&gt;info@rolustech.com&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Skype: rolustech&lt;/span&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12714?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 16:21:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:0e9f5b1d-c087-4c58-98cf-080517bf7f28</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;Thanks a lot, i&amp;#39;m a little rusted in Sugar 7, so thanks a lot for that ! i&amp;#39;ll try and come back to you :)&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Field dependancy : display a textfield dependant from a custom multi-enum</title><link>https://sugarclub.sugarcrm.com/thread/12712?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 16:20:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:ed6b680d-56b3-471e-8885-8631201ed4ac</guid><dc:creator>Gaelle Fernandez</dc:creator><description>&lt;span&gt;Hi Rafael,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Thank you for your answer, but this little code only works for Sugar 6, not Sugar 7 (we do not have ediviewdefs anymore in 7)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Have a nice day !&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>