Answers.Body: <p>You are currently passing a string <code>'&gt;= pers'</code> to the array. Change this to:</p>
  
  <pre><code>'&gt;= ' ~ pers
  </code></pre>
  
  <p>This "concatenates" the string <code>'&gt;= '</code> and the value of your pers variable (converted to a string).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-08T13:24:52.733Z
Answers.Text: Awesome! I had tried '>=' pers without the ~, so no succes. This works great, thanks!
Answers.UserDisplayName: Niels
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-07T17:26:53.547Z
Answers.LastActivityDate: 2015-10-10T18:15:00.640Z
Answers.LastEditDate: 2015-10-10T18:15:00.640Z
Answers.UserDisplayName: carlcs
Body: <p>Trying to do something quite basic but can't seem to get it right..</p>
  
  <p>I'm searching through a form, and want to select entries where the value 'pax' is equal or more than the searched value.</p>
  
  <pre><code>{% set params = {
  section:    'ships',
  limit:      null
  } %}
  
  {# pax #}
  {% if craft.request.getParam('pax') %}
    {% set pers = craft.request.getParam('pax') %}
    {% set params = params|merge({'pax' : '&gt;= pers'}) %}
  {% endif %}
  </code></pre>
  
  <p>Now, this doesn't seem to work. However, if I'd change the last line to:</p>
  
  <pre><code>  {% set params = params|merge({'pax' : '&gt;= 30'}) %}
  </code></pre>
  
  <p>It gives me excellent results. So, what am I doing wrong here? </p>
  
  <p>Much appreciated!!</p>
  
Tags: <search><params>
Title: Selecting entries with min value through search param
ThreadText: # Selecting entries with min value through search param
  
  (Asked by: username_0 on 2015-10-07)
  
  Trying to do something quite basic but can't seem to get it right..
  
  I'm searching through a form, and want to select entries where the value 'pax' is equal or more than the searched value.
  
  ```
  {% set params = {
  section:    'ships',
  limit:      null
  } %}
  
  {# pax #}
  {% if craft.request.getParam('pax') %}
    {% set pers = craft.request.getParam('pax') %}
    {% set params = params|merge({'pax' : '>= pers'}) %}
  {% endif %}
  
  ```
  
  Now, this doesn't seem to work. However, if I'd change the last line to:
  
  ```
    {% set params = params|merge({'pax' : '>= 30'}) %}
  
  ```
  
  It gives me excellent results. So, what am I doing wrong here?
  
  Much appreciated!!
  
  **Tags:** search, params
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-07. Score: 2 | Accepted answer
  
  You are currently passing a string `'>= pers'` to the array. Change this to:
  
  ```
  '>= ' ~ pers
  
  ```
  
  This "concatenates" the string `'>= '` and the value of your pers variable (converted to a string).
  
  > **Comments:**
  > **username_0**: Awesome! I had tried '>=' pers without the ~, so no succes. This works great, thanks!  
  
  ---
  
  