• Resolved Graicifyd

    (@graicifyd)


    I have two text fields that I would like to display in their content in the next page of a form.

    (function(){
    if(fieldname2===””) return fieldname14;
    if(fieldname14===””) return fieldname2;
    })()

    I used this formula to say that, if one is empty the other should be displayed…but it is not working. Please am I getting anything wrong?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    Please, remember the plugin always tries to get numbers to use in mathematical operations. If you want to check the raw value in the field, without pre-processing it, you should be referring to the field with the |r modifier.

    So, the equation should be edited as follows:

    
    IF(fieldname2|r == '', fieldname14, fieldname2)
    

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Thanks it worked. Just one more thing, can I make it output only the value rather than both value and label?

    Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    I don’t know what are you implementing, but the equation provided returns the value only. The equations use the fields values by default.

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Thank you so much.

    It’s working as expected.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘RETURNING TEXT IN CALCULATED FIELD’ is closed to new replies.