Note that there are some explanatory texts on larger screens.

plurals
  1. POHaving trouble in setting up conditions for action groups in XPages button events
    primarykey
    data
    text
    <p>I have this button on my custom control which I want to use to enable the users of the application to save the current contents as draft. The challenge is that I have 5 data-sources connected to different back-end forms and all reside on a single X-pages in different tabs and these tabs are shown and/or hidden based on the document work flow conditions. I need to be able to provide the save facility for all the data sources but need to set a field before that. To achieve this I used the Action Groups in the button and tried to execute them based on certain conditions, but they don't seem to execute at all even when the conditions are true. Here is the action group code:</p> <pre class="lang-xml prettyprint-override"><code>&lt;xp:this.action&gt; &lt;xp:actionGroup&gt; &lt;xp:actionGroup&gt; &lt;xp:this.condition&gt;&lt;![CDATA[#{javascript:if(parseInt(viewScope.curApprCycle) &gt; 2){ if(parseInt(viewScope.curApprStatus) &lt; 2){return true;} else return false;}else return false;}]]&gt;&lt;/xp:this.condition&gt; &lt;xp:saveDocument var="introspectionSheet"&gt;&lt;/xp:saveDocument&gt; &lt;/xp:actionGroup&gt; &lt;xp:actionGroup&gt; &lt;xp:this.condition&gt;&lt;![CDATA[#{javascript:if(parseInt(viewScope.curApprCycle)&gt;2){ return viewScope.showTLPTab;}return false;}]]&gt;&lt;/xp:this.condition&gt; &lt;xp:saveDocument var="TLP"&gt;&lt;/xp:saveDocument&gt; &lt;/xp:actionGroup&gt; &lt;xp:actionGroup&gt; &lt;xp:this.condition&gt;&lt;![CDATA[#{javascript:if(parseInt(viewScope.curApprCycle)&gt;2){ return viewScope.showAttributesTab;}return false;}]]&gt;&lt;/xp:this.condition&gt; &lt;xp:saveDocument var="Attributes"&gt;&lt;/xp:saveDocument&gt; &lt;/xp:actionGroup&gt; &lt;xp:actionGroup&gt; &lt;xp:this.condition&gt;&lt;![CDATA[#{javascript:if(parseInt(viewScope.curApprCycle) &gt; 2){ if(parseInt(viewScope.curApprStatus) &gt; 1){ return true; } return false;}return false;}]]&gt;&lt;/xp:this.condition&gt; &lt;xp:saveDocument var="PenPicture"&gt;&lt;/xp:saveDocument&gt; &lt;/xp:actionGroup&gt; &lt;/xp:actionGroup&gt; &lt;/xp:this.action&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload