title: FileMaker - Getting Data From Another Table with Multiple Field Restrictions
body: <p>I can't think of a better title, so feel free to make a suggestion once you understand the issue.</p>
  
  <p>I was given a table to work with that I need to call from another table:</p>
  
  <p>Name
  Month
  Type
  Value</p>
  
  <p>For each record in the main table I need to pull one "Value" that corresponds to it. What it is will be determined by all three of the other fields. So for example, if a record in the main table is:</p>
  
  <p>Name:
  Google</p>
  
  <p>Date:
  3\17\2016</p>
  
  <p>Type:
  M</p>
  
  <p>Then I need to pull the value for the record in the other table where the Name is "Google", the month is "3", and the type is "M".</p>
  
  <p>I was able to do this successfully (if slowly) using an ExecuteSQL command in a calculation field, with a ton of nested If statements for the names (I have yet to figure out how to input the record's data directly into the ExecuteSQL statement, it breaks when I try). I would prefer to just grab the data directly. I can't switch over to the other layout because I need to see all of the records at once. I can't do a simple relationship because there isn't a real relationship, it's like there are three foreign keys working in tandem and I only know how to use one to call the data.</p>
  
  <p>Any idea on how to do this more simplistically?</p>
  
  <p>Some ideas I've had but not sure if it will work:</p>
  
  <p>Using a calculation field as a related field to dynamically point to the row by code (concatenate the three relevant fields into a type of code). Not sure if you can connect two tables by a calculation field.</p>
  
  <p>Doing that same thing when calling the data into the table in the first place, adding a code to create a single primary key.</p>
  
  <p>Here are my relationships:</p>
  
  <p><a href="https://i.stack.imgur.com/sjMWp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sjMWp.png" alt="enter image description here"></a></p>