Title: string operations
Last modified: December 19, 2023

---

# string operations

 *  Resolved [michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * (@michaelrieder)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/)
 * Hi CodePeople
 * I’m currently looking for a solution to assign two values in a dropdown field.
 * Because I can assign only one value to a dropdown text (row) I thought I assign
   a value like 1123-14,5 and with a caculation field I extract the first part (
   1123) and with another calculation field I extract the second part (14,5). Any
   idea how to manage that. e.g. with string operations like right, left, find, 
   lenght …
 * Best Regards Michael
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fstring-operations-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17289213)
 * Hello [@michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * I’ll try to describe the process with a hypothetical example.
 * Assuming the dropdown field is the fieldname123, you can insert a calculated 
   field in the form and enter the equation:
 *     ```wp-block-code
       fieldname123|r.split('-')[0]
       ```
   
 * And the second equation:
 *     ```wp-block-code
       fieldname123|r.split('-')[1]
       ```
   
 * Please note 14,5 is no valid Javascript number. In Javascript, the decimal separator
   is the point. If you want to use the values for mathematical operations, I recommend
   you to enter `1123-14.5`
 * Best regards.
    -  This reply was modified 2 years, 3 months ago by [codepeople](https://wordpress.org/support/users/codepeople/).
 *  Thread Starter [michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * (@michaelrieder)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17289239)
 * You make my day!
 *  Thread Starter [michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * (@michaelrieder)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17289541)
 * Hi CodePeople
 * one more little issue: I make my selection and both splits work. Then I overwrite
   the calculated fields manually. When I do another selection, the manually edited
   values remain regardless of my selection of the dropdown field.
 * Best Regards Michael
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17289968)
 * Hello [@michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * The calculated fields have the “If value entered manually, no evaluate equation”
   checkbox. If you tick it, the field does not evaluate the equation when the user
   enters the value manually. If you untick the checkbox, the plugin evaluates the
   equation even if the user enters the field’s value manually.
 * Best regards.
 *  Thread Starter [michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * (@michaelrieder)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17291703)
 * Hi CodePeople
 * I made a test form under [https://teamtacho.de/000-test/](https://teamtacho.de/000-test/)
 * As long as I do not change any value everything works fine. Changing a value 
   and then select another dropdown entry the changed value stays.
 * After a second selection it works right. But if I change both values the first
   never resets anmore.
 * Best Regards Michael
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17292008)
 * Hello [@michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * My apologies for the delay in responding to your question. Could you please install
   the latest plugin update, released just now, and purge your website and browser
   caches?
 * Please let me know if the issue persists.
 * Best regards.
 *  Thread Starter [michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * (@michaelrieder)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17292038)
 * Hi CodePeople
 * with the new version of the plugin it works perfectly.
 * Thanks!
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17292057)
 * Hello [@michaelrieder](https://wordpress.org/support/users/michaelrieder/)
 * Thank you very much for the feedback.
 * Best regards.

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

The topic ‘string operations’ 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

 * [string](https://wordpress.org/support/topic-tag/string/)
 * [text](https://wordpress.org/support/topic-tag/text/)

 * 8 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/string-operations-2/#post-17292057)
 * Status: resolved