AnsweredAssumed Answered

Help with a script for inspection program

Question asked by danphillips on Jul 20, 2017
Latest reply on Jul 20, 2017 by danphillips

I am helping a friend on an inspection program and would like to ask for some advice on best practice (I have limited experience with FM). Inspections will be done yearly on each location.  I have a list of about 2,000 inspections and would like to organize them into inspection groups.  The user when configuring a location for inspections would select one or more groups, or individual inspections to add to the location specific inspections.  An inspection may appear in more than one group, and should only be added once.


I would like to know if the pseudo code below is this the best way to accomplish this process or is there a more efficient / easier way?


I am not asking anyone to write the code but if you have some suggestions it would be very helpful.  I considered using an sql append but thought it would better to stay with a FM script.



selects location

selects add inspections by group

group list displayed

select group and click “Add Inspections” button


pseudo code:

set filter on InspectionGroup = selected group


Loop for not eof (InspectionGroup)

  Goto layout LocationInspections

  If inspection is already in list



  Add new record

  Replace LocationInspections:_fkInspectionKey with InspectionGroup::_fkInspectionKey

  Goto layout InspectionGroup



Proposed Data Structure



__pkInspectionKeyID       number

Inspection number           text

Inspection description    text

Inspection details             text



__pkInspGroupID              number

GroupName                       text

_fkInspectionKey              number




__pkLocationKey              number

Address                               text

Contact                               text



__pkLocInspectionID       number

_fkInspectionKey              number

Pass_fail                             text

Review Notes                    text