AnsweredAssumed Answered

Copy Field to Related table ONLY IF not already present

Question asked by Nibbles on Dec 27, 2013
Latest reply on Dec 27, 2013 by philmodjunk

Title

Copy Field to Related table ONLY IF not already present

Post

     So this is my Layout w/explaination:

     Table A (VALUES) Holds combos of possible values. Setup this way

     FIELDS:

     Client, Facility, Building, Ward, Room

      

     Table B (BUILDING_ID) Holds the image of each unique building

     FIELDS:

     Building_ID (auto Serial), Building_Name, Building_Image

      

     What I need to accomplish here is to write a script that will automatically create a new record in table B. When a new unique building name has been created in table A.

     This will allow an admin to go back into table B if needed and add a building image for each unique building name. One can assume that the building field in table A will have duplicates as all buildings have multiple wards. 

     The script simply needs to copy the first instance of a new building name to table B, have the auto serial populate, and leave the building container image blank for later modification.

     The plan is to display the building image in a layout via portal. Where if a building name is selected from a conditional value list and the user clicks a button, the button will look up the building name from table B and display its image if it is available.

     Any suggestions, I normally work with Java, and filemaker scripting is throwing me for a real loop! Ive learned a little from PhilModJunk, but Im afraid to say Im still probably in the FMP12 noob category :(

      

Outcomes