2 Replies Latest reply on Mar 15, 2015 9:22 AM by Fred(CH)

    Get OpenRowState




      You probably know the inevitable Get(OpenRecordState) calc function, that helps us a lot, for instance on a script triggered by OnRecordLoad or OnRecordCommit.


      But certain new developer may ignore the fact that this calc function also works like a charm if used as an unstored calc, defined on a related table.


      Thus, you can, in the same context previously stated, test if portal row were created or modified during the current activation of the main record.


      By the way, you also can define a List aggregate field to know instantly if, yes or no, there were a row created or modified, and directly go to them in a loop.


      In a minor way, this trick may also could be useful on a conditional formatting.


      Enjoy !


      Bye, Fred

        • 1. Re: Get OpenRowState

          I'm assuming you are talking about creating an unstored calculation on the child table that uses the Get(RecordOpenState)?  Then yes; it's an easy way of identifying new and modified child records.


          You may want to do it do for Get(ModifiedFields).  When you are on the parent record and change an existing child record in a portal, those fields do not show up in the Get(ModifiedFields) call on the parent.  But the unstored calc on the child will pick it up.


          Be mindful though of the performance impact when asking for an unstored result on a large dataset.

          • 2. Re: Get OpenRowState

            Thank you  Wim, it is exactly what i tried to say .


            And thank you for this  complement.


            Also, true, i forgot to talk about performance that could be a problem since it use an unstored calc, particularly on a portal !