1 Reply Latest reply on May 30, 2013 8:38 AM by philmodjunk

    Post Code to determine the Clinic



      Post Code to determine the Clinic


           I hope someone can help -I'm new at all this.  I need to write a script that will determine which clinic to refer a patient according to their post code.  Unfortunately it is not in any sensible order eg  

           4000  -  4347  ->  Clinic A

           4341 - 4343  -> Clnic B

           4410 -> Clnica A

           4499  - 4601  -> Clinic C 


           I can't seem to get around scripting a Post Code between 4000 and 4347 and don't know how to do it.  I'm sure that this is basic but it's got me.



        • 1. Re: Post Code to determine the Clinic

               I wouldn't use scripting for this: I'd use a looked up value field option with at table of post codes and Clinic ID's

               Simplest to set up is a table where each record is a different post code and a second field in that same record stores the Clinic ID assigned to that post code.

               Then entering a post code in the parent table links to a specific record in this table and a Clinic ID field can look up the clinic ID to link the referral record to a specific clinic record for address, name, etc.