title: Filemaker if dropdown contains text alter calculation
body: <p>I am fairly sure stuff like this has been answered but I am losing my hair at the moment with this. I am using Filemaker Pro 13</p>
  
  <p>I have been landed with the job of updating some templates, I have done this before but all I was doing was updating the visual side of things. Now I am wanted to dynamically update some labels and calculations depending on a 'Company selected(drop down with custom values that are all text).</p>
  
  <p>Currently all costs are multiplied by 2. So if original cost = $4 then customer cost is $8. However if 'Company 4' is selected rather than being multiplied by 2 it needs to be multiplied by 1.5.</p>
  
  <p>I currently have two functions that I am trying to use this functionality on a field box.</p>
  
  <p>First function:</p>
  
  <pre><code>If (Company: = "Comp4"; 1;0)
  </code></pre>
  
  <p>Second function:</p>
  
  <pre><code>If (${Function1}; ${$Cost}*1.5; ${$Cost}*2 )
  </code></pre>
  
  <p>This does not work, hence the answering of this question. As far as I could understand if statements work as (Condintion; If true do X; Else do Y;). This may be the problem? I do come from a programming background but this program is irritating me beyond belief at the moment.</p>
  
  <p>If this has been answered before then I offer my sincerest apologies.</p>
  
  <p>Thank you for any answers or help pointing me into the right direction.</p>
  
  <p>Edit: Just tried this:</p>
  
  <pre><code>If (ValueCount(FilterValues(Company;"Comp4"));${$Cost}*1.5; ${$Cost}*2)
  </code></pre>
  
  <p>This was to no avail. Ideally if I could fit this into one function that would be great but so far I am still failing.</p>
  
  <p>Edit 2:</p>
  
  <p>With regards to the function / functions not working. I would often only get the <code>${$Cost}*2</code> side of things would happen however the <code>${$Cost}*1.5</code> would not even when "Comp4" was selected. This made me think that it was either the system was not detecting "Comp4" was selected or I need to look elsewhere to find the value I need to look at.</p>
  
  <p>Edit 3: Real values and calculations used</p>
  
  <p>Currently used and working so to speak ( Just does the *2 aspect of things)
  Field Name: <code>x2$Charges</code>
  Calculation: <code>${$Charges}*2. - $Charges is the 'cost' fields (10 of them).</code></p>
  
  <p>What I want to do is when a specific company is selected rather than doing cost *2 I want to do cost *1.5.</p>
  
  <p>The check for said company is :</p>
  
  <p>Field Name: <code>x2CheckSSL</code>
  Calculation: <code>If(Sales Rep.|Distributor: = "SSL";1.5;2)</code></p>
  
  <p>Where Sales Rep.|Distributor: is 'Company'</p>