• Resolved Anurag

    (@joieeninde12)


    Hello,
    I am trying to figure my way through the various settings.

    I have created the following conditional logic calculation entries.
    But unable to get any result.
    Please note, all fieldname entries are simple numbers.

    My entries:
    IF(fieldname2==10)return (fieldname16*10)+(fieldname12*10)+(fieldname14+fieldname15);
    IF(fieldname2==11)return (fieldname17*11)+(fieldname12*11)+(fieldname14+fieldname15);

    Please indicate my mistake(s).
    Regards,

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

    (@codepeople)

    Hello @joieeninde12

    My apologies for the delay in respond to your question. I’ve not received the WordPress notification.

    Javascript is a case sensitive language. Please, do not confuse the IF operation of the plugin with the if conditional statement of javascript.

    If you want to implement the equation by using the IF operation, the correct would be:

    
    IF(fieldname2==10, fieldname16*10+fieldname12*10+fieldname14+fieldname15, IF(fieldname2==11, fieldname17*11+fieldname12*11+fieldname14+fieldname15, ''))
    

    The same equation can be implemented by using the if conditional statement as follows:

    
    (function(){
    if(fieldname2==10) return fieldname16*10+fieldname12*10+fieldname14+fieldname15;
    if(fieldname2==11) return fieldname17*11+fieldname12*11+fieldname14+fieldname15;
    })()
    

    Best regards.

    Thread Starter Anurag

    (@joieeninde12)

    Thank you so much for your help. The issue is resolved.
    My apologies for not responding earlier.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Am I missing out something?’ is closed to new replies.