6 Replies Latest reply on Jun 7, 2013 4:17 PM by JimMac

    How many "If" statements in a step script is too many?

    JeremyHammer

      Title

      How many "If" statements in a step script is too many?

      Post

           I have a well running asset manager database in FileMakerPro 11 based around an keeping track of an inventory of school laptops and repairs to them.

           I'm trying to add a new evaluation/collection tool to it to be used on an iPhone that essentially lets you click on a range of buttons containing parts which populates a field with a part number for that part.  It then allows me to send this range of parts into another repair table which we currently use to manage repairs.

           This workflow I'm describing does work exactly as I want it to, but only most of the time.  Sometimes it drops random parts from the migration of the evaluation table to the repair table and I can find no logic to the failure.  The data all appears in the evaluation table as expected, and sometimes it all makes it to the repair but not every time.

           I have to assume my step script is choking, and when I made it I kind of feared it might.  Every one of 15 parts has an "IF this field is populated DO this" sort of logic, so I have 15 IF-ENDIF statements lined one to the next.  Within each statement I have a very clunky "GO to one layout, COPY a piece of information, GO to another layout, PASTE it in place..." set of instructions which there must be a better way to accomplish but for the life of me I can't make work any other way.

           I realize it's a bit much to ask, but I'd love to get any advice you all could offer, as currently I have a great tool working unreliably that needs to be reliable.  I've included a relevant screenshot that should be enough to grok the concept.

       

      Screen_Shot_2013-06-07_at_1.22.16_PM.png