Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter rolbuk

    (@rolbuk)

    Okey, it works. The other problem is that above number 29, fieldname2 <= 30 return 8.99, otherwise 0.
    How can I implement it into my formula below? Thanks!

    (function(){
    if(AND(fieldname11 == ‘Omniva’, fieldname2 <= 1)) return 5.99;
    if(AND(fieldname11 == ‘Omniva’, fieldname2 <= 2)) return 6.99;
    return 2.99;
    })()

    • This reply was modified 6 years, 3 months ago by rolbuk.
    • This reply was modified 6 years, 3 months ago by rolbuk.
    • This reply was modified 6 years, 3 months ago by rolbuk.
    • This reply was modified 6 years, 3 months ago by rolbuk.
    Thread Starter rolbuk

    (@rolbuk)

    Thanks @codepeople now it works. But the next formula with fieldname <= 2 does not show right result. Anything wrong with this formula?
    (function(){
    if(AND(fieldname11 == ‘Omniva’, fieldname2 <= 1))
    return 5.99;
    return 2.99;
    if(AND(fieldname11 == ‘Omniva’, fieldname2 <= 2))
    return 6.99;
    return 2.99;
    })()

    Thread Starter rolbuk

    (@rolbuk)

    Hi,
    I think I found the right calculation, but it doesn’t work, could you please tell what is wrong with this formula? Thanks.

    (function(){
    if((AND(fieldname11 == ‘Omniva’, fieldname2 <= 2) ) return 5.99; return 2.99;
    })()

    Actually it explain the flow if fieldname11 is Omniva and fieldname <=2 result 5.99, otherwise 2.99

    Thread Starter rolbuk

    (@rolbuk)

    @codepeople but it wouldn’t calculate both prices. I need formula which would show result of if(fieldname1 <= 2) return 2.89; + if(fieldname2 != ‘FEDEX’) return 2.99;
    We very close to right formula:)

    • This reply was modified 6 years, 3 months ago by rolbuk.
    Thread Starter rolbuk

    (@rolbuk)

    Thanks you both.
    Codepeople there is additional price which calculated like this
    if(fieldname1 <= 2) return 2.89;
    if(fieldname1 <= 3) return 3.39;
    if(fieldname1 <= 4) return 3.89;

    How can I connect these calculation? It should be something like this
    (function(){
    if(fieldname1 <= 2) return 2.89+(fieldname2==’FEDEX’);
    if(fieldname1 <= 3) return 3.39+(fieldname2==’FEDEX’);

    })()

Viewing 5 replies - 1 through 5 (of 5 total)