Branch logic within Action Sequence: (whenfinished="stop") is not working

edited March 19, 2020 in Questions
I have an action sequence built (see below) that has multiple branches that all are set whenfinished=stop.  When I use this action sequence on a button, there doesn't seem to be much respect for the 'stop'. How can I ensure the stop is respected?



<actionsequence id="c6943f8c-2a0c-46c1-9955-d8ddfaa00694" label="Next: Joint/Co" type="reusable">
<description/>
<actions>
<action type="deactivateFilterableConditions">
<models>
<model>{{$Input.Current Model}}</model>
</models>
</action>
<action type="abandonRows" model="{{$Input.Current Model}}" affectedrows="context"/>
<action type="branch" whenfinished="stop" model="BC_App_Consumer_LoanReview" label="Edit = Primary">
<formula>{{UI_Only_Edit_Applicant__c}}='Primary'</formula>
<iftrueactions>
<action type="branch" whenfinished="stop" label="Joint = TRUE" model="BC_App_Consumer_Applicant_Primary">
<formula>{{Joint_Credit__c}}=TRUE</formula>
<iftrueactions>
<action type="updateRow" fieldmodel="BC_App_Consumer_LoanReview" affectedrows="context">
<updates>
<update valuesource="fieldvalue" field="UI_Only_Edit_Applicant__c" enclosevalueinquotes="true" value="Spouse"/>
</updates>
</action>
<action type="activateCondition" model="{{$Input.Current Model}}" condition="{{$Input.Spouse}}"/>
<action type="requeryModel" model="{{$Input.Current Model}}" behavior="standard"/>
<action type="unblockUI"/>
</iftrueactions>
</action>
<action type="branch" whenfinished="stop" label="Co = TRUE" model="BC_App_Consumer_Applicant_Primary">
<formula>{{Non_Spouse_Co_or_Guarantor__c}}=TRUE</formula>
<iftrueactions>
<action type="updateRow" fieldmodel="BC_App_Consumer_LoanReview" affectedrows="context">
<updates>
<update valuesource="fieldvalue" field="UI_Only_Edit_Applicant__c" enclosevalueinquotes="true" value="Co"/>
</updates>
</action>
<action type="activateCondition" model="{{$Input.Current Model}}" condition="{{$Input.Co}}"/>
<action type="requeryModel" model="{{$Input.Current Model}}" behavior="standard"/>
<action type="unblockUI"/>
</iftrueactions>
</action>
</iftrueactions>
</action>
<action type="branch" whenfinished="stop" model="BC_App_Consumer_LoanReview" label="Edit = Spouse">
<formula>{{UI_Only_Edit_Applicant__c}}='Spouse'</formula>
<iftrueactions>
<action type="branch" whenfinished="stop" model="BC_App_Consumer_Applicant_Primary" label="Co = TRUE">
<formula>{{Non_Spouse_Co_or_Guarantor__c}}=TRUE</formula>
<iftrueactions>
<action type="updateRow" fieldmodel="BC_App_Consumer_LoanReview" affectedrows="context">
<updates>
<update valuesource="fieldvalue" field="UI_Only_Edit_Applicant__c" enclosevalueinquotes="true" value="Co"/>
</updates>
</action>
<action type="activateCondition" model="{{$Input.Current Model}}" condition="{{$Input.Co}}"/>
<action type="requeryModel" model="{{$Input.Current Model}}" behavior="standard"/>
<action type="unblockUI"/>
</iftrueactions>
</action>
</iftrueactions>
</action>
<action type="updateRow" fieldmodel="BC_App_Consumer_LoanReview" affectedrows="context">
<updates>
<update valuesource="fieldvalue" field="UI_Only_Edit_Applicant__c" enclosevalueinquotes="true" value="Primary"/>
</updates>
</action>
</actions>
<inputs>
<input type="model" name="Current Model"/>
<input type="model-condition" name="Spouse" model-source="Current Model"/>
<input type="model-condition" name="Co" model-source="Current Model"/>
</inputs>
</actionsequence>

Comments

  • Anna WiersemaAnna Wiersema 🛠️ 
    edited March 19, 2020
    Hi Scott, thanks for sharing the XML for your action sequence.
    • What version of Skuid are you using? I recall in one org you had upgraded to 12.2.17, is that the case for this issue?
    • Are you building in API v1 or v2?
    • You mentioned the stops aren't getting respected when the action sequence is surfaced via a button. Are the stops respected in other scenarios?
    • Try having your action sequence show a message with the merge formulas e.g. {{$Input.Current Model}} or create a Javascript snippet to print them to the console. This way you can make sure these variables are bringing in the correct values,
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!