ITERATE suggestions

Clovertech Forums Read Only Archives Cloverleaf Product Enhancements ITERATE suggestions

  • Creator
    Topic
  • #55575
    Jim Kosloskey
    Participant

      Enhancement short description:

      Add ability to preset the ITERATE variable and ability for the variable value to be preserved after the ITERATE is complete

      Date:

      12/20/2017

      Operating System:

      Any

      Version of OS:

      N/A

      Cloverleaf Version:

      Next Version??

      Revision:

      N/A

      Tool:

      Xlate

      Enhancement Long Description:

      I think it would be helpful if one could pre-load the starting point for an ITERATE. For example if one wanted to begin an OBX Group Iteration somewhere other than the beginning (assume %g1 is the ITERATE Variable) one could just COPY =4 to $%g1 prior to the ITERATE and the ITERATE would check to see if its variable (in this case %g1) is anything other than zero – or – one could set the variable and then in the ITERATE Configuration check a checkbox indicating the value is already set.

      This would provide a more efficient way of beginning an Iteration other than the beginning rather than Iterating and inside the ITERATE checking until the appropriate repetition is found and then do real work.

      Also sometimes it is needed to know how many iterations there are in a set. Currently at the end of an ITERATE the Variable is reset to zero. So what we do is to COPY $% to either a temp variable or our own ITERATE Variabele (ie $%g99) and then at the end of the ITERATE our variable has the same value as the last iteration variable thus giving us the high water mark.

      Even more efficient might be if there were a way to just get the ITERATE Variable populated with the count of repeating elements without actually Iterating.

      Also with the inclusion of the BREAK capability it would be nice to be able to know where in the repetition set the break took place.

      In both cases if the ITERATE configuration had a checkbox that allowed preserving of the variable value at exit from the ITERATE (either normal falling out of the end or issuance of a BREAK) I think that would simplify some of the coding and perhaps add some efficiency.

      Anybody have thoughts on this?

      I did not use Infor Xtreme because I do not currently have access to Infor Xtreme.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    Viewing 1 reply thread
    • Author
      Replies
      • #85792
        Robert Milfajt
        Participant

          Jim, I’m thinking you would want all the configuration options on the ITERATE command itself, set starting value, set ending value (why not, right) and preserve ITERATE variable value.

          BTW, I’m voting yes, and think this is a good idea.

          Robert Milfajt
          Northwestern Medicine
          Chicago, IL

        • #85793
          Jim Kosloskey
          Participant

            Robert,

            Good suggestion. Having to specify means the change could be backward compatible.

            For example, if the start is left empty on the ITERATE Action, then the ITERATE would start at zero as before.

            Thus existing Xlates would not need to be touched in order to get the same results.

            email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        Viewing 1 reply thread
        • The forum ‘Product Enhancements’ is closed to new topics and replies.