Title: Define dependencies
Last modified: April 19, 2024

---

# Define dependencies

 *  Resolved [civilvicky](https://wordpress.org/support/users/civilvicky/)
 * (@civilvicky)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/define-dependencies-3/)
 * Hello,
 * I am using define dependencies feature for one of my calculated field. I want,
   if the value of my calculated field is less than 1 then show ‘xyz’ fieldname.
   This is working fine but both the fields are showing I want that if the value
   of calculated field is less than 1 then only the ‘xyz’ field should be shown.

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/define-dependencies-3/#post-17699448)
 * Hello [@civilvicky](https://wordpress.org/support/users/civilvicky/)
 * I’ll try to describe the process with a hypothetical example.
 * Assuming the calculated field is the fieldname123, and has the equation fieldname1
   +fieldname2, and the field to show/hide is the fieldname456.
 * You can edit the equation as follows:
 *     ```wp-block-code
       (function(){
       let result = fieldname1+fieldname2;
   
       if(result < 1) {
           ACTIVATEFIELD(fieldname456|n);
           HIDEFIELD(fieldname123|n);
       } else {
           IGNOREFIELD(fieldname456|n);
           SHOWFIELD(fieldname123|n);
       }
   
       return result;
       })()
       ```
   
 * Note I used the ACTIVATEFIELD/IGNOREFIELD operations with the third-party field,
   and HIDEFIELD/SHOWFIELD with the calculated field to avoid endless loops.
 * Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Define dependencies’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/define-dependencies-3/#post-17699448)
 * Status: resolved