adopting Rows and then having branch to remove no longer removes adopted row

  • 2
  • Problem
  • Updated 1 year ago
  • In Progress
I recently upgraded to Brooklyn Q2 Release and was in the middle of building a page. I have an action on the model to where if a boolean "Non-Inventory Receive All" is checked it adopts that row into another model. From POLineItems to POLineItemsToReceive. However, if they uncheck the boolean, I'd like it to remove the adopted row from the POLineItemsToReceive model. 

Before the update this worked! But, now that I've updated it no longer works :-(. I've tried several different way to make this happen, but can't seem to find a way to make it work. Here is the UI version and the XML.

Any idea a way around this? Is this a bug or is this how it was intended to work in the first place. I tried to find more info about the AdoptRows and RemoveRows function in Developer Guide, but couldn't find an answer. Thanks for any help you can provide!



<actions>
                        <action type="branch">
                            <iftrueactions>
                                <action type="updateRow" fieldmodel="POLineItems" affectedrows="context" field="NonInventoryQty" enclosevalueinquotes="true" value="{{QtyLeftToReceive}}"/>
                                <action type="adoptRows" sourcemodel="POLineItems" targetmodel="POLineItemsToReceive" affectedrows="context"/>
                            </iftrueactions>
                            <formula>{{NonInventoryReceiveAll}} == true</formula>
                        </action>
                        <action type="updateRow" fieldmodel="POLineItems" affectedrows="context" field="NonInventoryQty" enclosevalueinquotes="false" value=""/>
                        <action type="abandonRows" model="POLineItemsToReceive" affectedrows="context"/>
                    </actions>
Photo of Sam Becker

Sam Becker

  • 1,178 Points 1k badge 2x thumb

Posted 1 year ago

  • 2
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
How about two separate model actions. One with a branch if the Boolean is updated and is true and a separate action for if the Boolean is updated and is false.
(Edited)
Photo of Sam Becker

Sam Becker

  • 1,178 Points 1k badge 2x thumb
Unfortunately that didn't work either. I think it has something to do with the Id that the row is given and the id that is given when removing the row. Something to do with how adopted rows are given an Id after the Brooklyn update. 

Not sure if this is related, but the "Id" of a row has been changed when using create row. It used to be a just a Number and now it's unique Id. I'm wondering if a similar update was made to Adopting and Abandoning Rows. I can't seem to find anything about it though.