1 Reply Latest reply on Jun 15, 2009 7:51 AM by mrvodka

    Use a variable to see if a record exists.



      Use a variable to see if a record exists.


      <!-- [if gte mso 9]><xml> <w:WordDocument>   <w:View>Normal</w:View>   <w:Zoom>0</w:Zoom>   <w:PunctuationKerning/>   <w:ValidateAgainstSchemas/>   <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>   <w:IgnoreMixedContent>false</w:IgnoreMixedContent>   <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>   <w:Compatibility>    <w:BreakWrappedTables/>    <w:SnapToGridInCell/>    <w:WrapTextWithPunct/>    <w:UseAsianBreakRules/>    <w:DontGrowAutofit/>   </w:Compatibility>   <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif] --><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif] --><!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal      {mso-style-parent:"";      margin:0in;      margin-bottom:.0001pt;      mso-pagination:widow-orphan;      font-size:12.0pt;      font-family:"Times New Roman";      mso-fareast-font-family:"Times New Roman";} @page Section1      {size:8.5in 11.0in;      margin:1.0in 1.25in 1.0in 1.25in;      mso-header-margin:.5in;      mso-footer-margin:.5in;      mso-paper-source:0;} div.Section1      {page:Section1;} --><!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable      {mso-style-name:"Table Normal";      mso-tstyle-rowband-size:0;      mso-tstyle-colband-size:0;      mso-style-noshow:yes;      mso-style-parent:"";      mso-padding-alt:0in 5.4pt 0in 5.4pt;      mso-para-margin:0in;      mso-para-margin-bottom:.0001pt;      mso-pagination:widow-orphan;      font-size:10.0pt;      font-family:"Times New Roman";      mso-ansi-language:#0400;      mso-fareast-language:#0400;      mso-bidi-language:#0400;} </style> <![endif] -->

      Is there a command that will tell you if there is an entry in a table that contains a certain value? For example I want to query a source and get a unique Customer ID and put that into a variable. Then with that variable I want to ask filemaker if that customer ID is already in my database so that I can skip entering it into the database or alter the record to avoid conflicts. Also can I have filemaker go to that record if it exists so I may edit it to resolve the conflict?


      Additionally this is probably going to be done on a few thousand records at a time so whatever method takes the least amount of computing power would be best :)

        • 1. Re: Use a variable to see if a record exists.
             you can store the IDs into a global text field as a list ( seperated by carriage returns ). Then with a table occurrence and a relationship keyed from this field to your ID field, you can use a Go to Related Records. Technically, you could just use a Go to Related Records from your first table where you look up the IDs, based off your found set there, but a GTRR from a single record using a global field is much faster than GTRR from found set.