• Resolved civilvicky

    (@civilvicky)


    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

    (@codepeople)

    Hello @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:

    (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.