3 Replies Latest reply on May 10, 2011 8:05 AM by philmodjunk

    Old Script New Problem



      Old Script New Problem


      I've been working on a property inventory solution for a while now and have overlooked a scripting flaw. When the user creates a room within the property (through a portal), it creates standard inventory items, "Flooring", "Walls", "Windows" etc within that room.

      The script is a simple "On object modify" on a drop down field within the portal that creates the standard items for that particular room. I thought that was it sorted, but after reviewing my solution, if the user selects a room from the drop down list then changes their mind and amends that field, when they enter the room, both room's standard items are created.

      Can anyone suggest a more "fixed" way of adding this?


        • 1. Re: Old Script New Problem


          if u know how to manage filemaker scripts and databases u could personalize ur database to suit ur needs :)



          • 2. Re: Old Script New Problem

            can you elaborate at all?

            • 3. Re: Old Script New Problem

              From what I remember of your script, that seems reasonable as the script creates the "standard" list of related records for the room type selected. The simplest fix might be to delete the record and try again. If you've enabled the delete option for the related records, this will delete them at the same time and then you can select a new room type for the new room record.

              You might modify your script to check for the presence of related records and have it use Show Custom Dialog to ask for confirmation before going forward and adding more related records to what you already have. (Selecting the same room type twice by accident might create an even more confusing situation by doubling all the related records created.)