• Resolved nateyarbrough

    (@nateyarbrough)


    Having issues with getting a calculated field to pick up the result of another calculated field.

    fieldname1: Input Text: test 1

    Calculated Field: fieldname2:

    (function(){
    
    if(fieldname1 == "test 1") return "60A B2B Charger";
    
    })();

    Calculated Field: fieldname 3

    (function(){
    
    if(fieldname4 == "60A B2B Charger") return "60A";
    
    })();

    When I have a 2nd calculated field that is dependant on the 1st calculated field; the 2nd calculated field never shows anything.

    If the “fieldname ==” is a number without text, it works fine; but as soon as text is introduced; it breaks. Any advice?

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

    (@codepeople)

    Hello @nateyarbrough

    The calculated fields always try to return a number to be used in the mathematical operations, if you want to compare with the real value in the field uses the |r modifier:

    
    (function(){
    
    if(fieldname4|r == "60A B2B Charger") return "60A";
    
    })();
    

    Best regards.

    Thread Starter nateyarbrough

    (@nateyarbrough)

    Thanks so much! That fixes SO many problems I was having. ?? Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calculate Field as result of Calculated Field’ is closed to new replies.