Title: Dynamic Formatting Calculated Field
Last modified: April 21, 2020

---

# Dynamic Formatting Calculated Field

 *  Resolved [dirk93](https://wordpress.org/support/users/dirk93/)
 * (@dirk93)
 * [6 years ago](https://wordpress.org/support/topic/dynamic-formatting-calculated-field/)
 * Hi,
 * I’m trying to add a “+” to the beginning of a string IF the field it is referencing
   is greater than 0. My formula is below but it always seems to strip the “+”. 
   Does this have to do with the plus sign being a special character?
 * IF(fieldname1>0,CONCATENATE(‘+’,fieldname1),fieldname1)

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [6 years ago](https://wordpress.org/support/topic/dynamic-formatting-calculated-field/#post-12708254)
 * Hello [@dirk93](https://wordpress.org/support/users/dirk93/)
 * I don’t know if your copy of the plugin includes the CONCATENATE operation, however,
   your equation can be implemented as follows:
 *     ```
       IF(fieldname1>0,'+'+fieldname1,fieldname1)
       ```
   
 * Best regards.
 *  Thread Starter [dirk93](https://wordpress.org/support/users/dirk93/)
 * (@dirk93)
 * [6 years ago](https://wordpress.org/support/topic/dynamic-formatting-calculated-field/#post-12708616)
 * [@codepeople](https://wordpress.org/support/users/codepeople/) thats perfect,
   thanks! As a follow up question, is there a way to achieve this for a calculated
   field that serves as an input field?
 * For example, if I enter 150 into the field, I would like it to be formatted as
   +150. If a user enters -150, I would want it to display as -150.
 * I saw the __ME__ function but wasn’t able to get it to work. Thanks so much for
   the assistance!
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [6 years ago](https://wordpress.org/support/topic/dynamic-formatting-calculated-field/#post-12708771)
 * Hello [@dirk93](https://wordpress.org/support/users/dirk93/)
 * I don’t understand your confusion because the process is the same. I’ll try to
   describe it with a hypothetical example:
 * Assuming the current equation is: `fieldname1+fieldname2`
 * You simply should to edit it as follows:
 *     ```
       (function(){
           var result = fieldname1+fieldname2;
           return IF(result>0,'+'+result,result);
       })()
       ```
   
 * and that’s all.
    Best regards.

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

The topic ‘Dynamic Formatting Calculated Field’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/dynamic-formatting-calculated-field/#post-12708771)
 * Status: resolved