Title: Exact match in string array
Last modified: November 10, 2021

---

# Exact match in string array

 *  Resolved [tanydrej0](https://wordpress.org/support/users/tanydrej0/)
 * (@tanydrej0)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/exact-match-in-string-array/)
 * Hello, I would like to create a simple function which will be able to verify 
   in an array of string the exact correspondence of the value entered by the user.
 * Here is an example, however it returns true as soon as a letter matches the string
 * `IF(IN(fieldname2, ["Ramecourt", "Saint-Pol"]), "ZONE 1", "ZONE INCONNUE")`
 * –> If user type : “R” it returns true = “ZONE 1”
    –> User needs to type “Ramecourt”
   or “Saint-Pol” or “ramecourt” for a valid return…
 * Can you help me people?
    Thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/exact-match-in-string-array/#post-15054718)
 * Hello [@tanydrej0](https://wordpress.org/support/users/tanydrej0/)
 * Please, indicate the URL to the page with the form to check the equation in action.
 * Best regards.
 *  Thread Starter [tanydrej0](https://wordpress.org/support/users/tanydrej0/)
 * (@tanydrej0)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/exact-match-in-string-array/#post-15054727)
 * I am currently using a local server to develop my website …
    Thank you for your
   quick reply
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/exact-match-in-string-array/#post-15054757)
 * Hello [@tanydrej0](https://wordpress.org/support/users/tanydrej0/)
 * Please, edit the equation as follows:
 * `IF(OR(fieldname2=="Ramecourt", fieldname2=="Saint-Pol"), "ZONE 1", "ZONE INCONNUE")`
 * Best regards.
 *  Thread Starter [tanydrej0](https://wordpress.org/support/users/tanydrej0/)
 * (@tanydrej0)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/exact-match-in-string-array/#post-15054778)
 * [@codepeople](https://wordpress.org/support/users/codepeople/)
    Thanks you sir
   it’s working.
 * Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Exact match in string array’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [Calculated](https://wordpress.org/support/topic-tag/calculated/)
 * [form](https://wordpress.org/support/topic-tag/form/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [in](https://wordpress.org/support/topic-tag/in/)
 * [string](https://wordpress.org/support/topic-tag/string/)

 * 4 replies
 * 2 participants
 * Last reply from: [tanydrej0](https://wordpress.org/support/users/tanydrej0/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/exact-match-in-string-array/#post-15054778)
 * Status: resolved