<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom outcome based on conditions in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40559#M17010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to be a Browser issue. If I use &lt;EM&gt;button.textContent&lt;/EM&gt; instead of &lt;EM&gt;button.innerText&lt;/EM&gt; it works. I use Firefox&amp;nbsp;38.4.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the code I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Event: formRendered&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var buttons = angular.element(document.getElementsByClassName("activiti-btn"));&lt;BR /&gt;for(var i = 0; i &amp;lt; buttons.length; i++){&lt;BR /&gt;var button = buttons[i];&lt;BR /&gt;if(button.textContent == "OUTCOME 1" || button.textContent == "OUTCOME 2"){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Event: formFieldValueChanged&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;var buttons = angular.element(document.getElementsByClassName("activiti-btn"));&lt;BR /&gt;var intcount = scope.findFormFieldWithId(scope.allFormFields, 'thenumber');&lt;/DIV&gt;&lt;DIV&gt;for(var i = 0; i &amp;lt; buttons.length; i++){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var button = buttons[i];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = false;&lt;BR /&gt;&amp;nbsp;if(button.textContent == "OUTCOME 2" &amp;amp;&amp;amp; intcount.value &amp;lt; 11){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;if(button.textContent == "OUTCOME 1" &amp;amp;&amp;amp; intcount.value &amp;gt; 10){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Thanks again for your help!&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Marco&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Jun 2017 08:19:39 GMT</pubDate>
    <dc:creator>mrahn</dc:creator>
    <dc:date>2017-06-01T08:19:39Z</dc:date>
    <item>
      <title>Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40551#M17002</link>
      <description>Dear community.Using Alfresco Process Services I wonder whether I could have costom outcomes based on conditions.Example:In a form a user provideds the expected price for something that has to be ordered. If the value is&amp;nbsp;not above&amp;nbsp;10.000€ the user should get an outcome buttom labelled&amp;nbsp;Send to A. If</description>
      <pubDate>Thu, 25 May 2017 17:10:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40551#M17002</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-05-25T17:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40552#M17003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a javascript function to the formFieldValueChanged event to disable the second "outcome" button if the value entered is &amp;lt; 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var buttons = angular.element(document.getElementsByClassName("activiti-btn"));&lt;/P&gt;&lt;P&gt;for(var i = 0; i &amp;lt; buttons.length; i++){&lt;BR /&gt; var button = buttons[i];&lt;BR /&gt; button.disabled = false;&lt;BR /&gt; if(button.innerText == "OUTCOME 2" &amp;amp;&amp;amp; field.value &amp;lt; 10){&lt;BR /&gt; button.disabled = true;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a simple app example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 21:15:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40552#M17003</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-26T21:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40553#M17004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Greg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;I understand what the script does and wonder why it doesn't work in my environment. We run Alfresco Process Services 1.6.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 05:42:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40553#M17004</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-05-29T05:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40554#M17005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did the project I attached work in your environment?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 17:01:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40554#M17005</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-30T17:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40555#M17006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no, unfortunately not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 18:10:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40555#M17006</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-05-30T18:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40556#M17007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version are you running? I built this with 1.6.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 18:20:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40556#M17007</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-30T18:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40557#M17008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alfresco Process Services 1.6.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get both of the outcome buttoms whatever value (number) is choosen.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/alfresco/14211_Outcome example.png" style="width: 620px; height: 196px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 18:47:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40557#M17008</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-05-30T18:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40558#M17009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm,&lt;/P&gt;&lt;P&gt;Certainly workign in 1.6.1.&lt;/P&gt;&lt;P&gt;Try adding the following to the formRendered event to disable both outcomes until such time as you enter something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var buttons = angular.element(document.getElementsByClassName("activiti-btn"));&lt;/P&gt;&lt;P&gt;for(var i = 0; i &amp;lt; buttons.length; i++){&lt;BR /&gt; var button = buttons[i];&lt;BR /&gt; button.disabled = true;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the class name may have changed between 1.6 and 1.6.1 so make sure the buttons are actually being found (add a debugger statement to ensure all 4 buttons are matched).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 19:01:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40558#M17009</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-30T19:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom outcome based on conditions</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40559#M17010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to be a Browser issue. If I use &lt;EM&gt;button.textContent&lt;/EM&gt; instead of &lt;EM&gt;button.innerText&lt;/EM&gt; it works. I use Firefox&amp;nbsp;38.4.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the code I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Event: formRendered&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var buttons = angular.element(document.getElementsByClassName("activiti-btn"));&lt;BR /&gt;for(var i = 0; i &amp;lt; buttons.length; i++){&lt;BR /&gt;var button = buttons[i];&lt;BR /&gt;if(button.textContent == "OUTCOME 1" || button.textContent == "OUTCOME 2"){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Event: formFieldValueChanged&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;var buttons = angular.element(document.getElementsByClassName("activiti-btn"));&lt;BR /&gt;var intcount = scope.findFormFieldWithId(scope.allFormFields, 'thenumber');&lt;/DIV&gt;&lt;DIV&gt;for(var i = 0; i &amp;lt; buttons.length; i++){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var button = buttons[i];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = false;&lt;BR /&gt;&amp;nbsp;if(button.textContent == "OUTCOME 2" &amp;amp;&amp;amp; intcount.value &amp;lt; 11){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;if(button.textContent == "OUTCOME 1" &amp;amp;&amp;amp; intcount.value &amp;gt; 10){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.disabled = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Thanks again for your help!&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Marco&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 08:19:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-outcome-based-on-conditions/m-p/40559#M17010</guid>
      <dc:creator>mrahn</dc:creator>
      <dc:date>2017-06-01T08:19:39Z</dc:date>
    </item>
  </channel>
</rss>

