• Resolved manpasand

    (@manpasand)


    Hello, I have a problem with Conditional Logic for filling the amount. I am ONLY asking the GROSS INCOME from the user and rest of the two calculations (home expenses and business expenses) I am doing with the form. I have setup max amount for Home Expenses ($3000) and Business Expenses ($2000).

    Now the problem is, if business expenses goes beyond to that amount, form input should show only $2000 BUT if it is less than $2000 input shows actual figure (e.g. $1584).

    I facing problem in the Formula Builder to show the amount.

    How can I fix that?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Err… sorry i didn’t understand your problem, do you want a field that if they put more that the maximum amount it uses the maximum amount and if it is lees than the maximum amount it uses the actual amount submitted?

    Thread Starter manpasand

    (@manpasand)

    Sorry, I want user amount should compare with $2000 if the it is low then show the actual lower figure but if the amount is higher than $2000 then figure should show only $2000.

    During my research I found a link in Google at https://goo.gl/Pkoq1R

    Here, if I put Gross income $3000 then INCOME TOTAL AMOUNT shows $2770.50 BUT I want it should show only $2000 because $2770.50 is is higher than $2000.

    BUT at the same time if I put gross income $2000 then INCOME TOTAL AMOUNT shows $1847 that will not change because $1847 is lower than $2000.

    I don’t know what form they are using but its first three inputs (Income, FICA and Income total) will work for my model of form.

    So how to configure via Formula Builder.

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Ok, so if i understand correctly you will have two fields ‘Gross Income’ and ‘Income Total Amount’

    Gross Income is going to be an editable field that your user is going to fill and income total is going to be a either 2000 or the same as ‘Gross Income’ whatever is less. Am i right?

    If so in your ‘Income Total Amount’ field should use this formula:

    Math.min([Gross Income], 2000)

    Thread Starter manpasand

    (@manpasand)

    Yes, you are right.

    Getting Syntax Error when I use Math.min([Gross Income], 2000) OR RNFRound Math.min([Gross Income], 2000) in the Formula Builder.

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Yes sorry for that, the validator doesn’t understand that Math.min, please try to execute the formula and see if it works. If it is still not working please let me know!

    Thread Starter manpasand

    (@manpasand)

    What formula I should use?

    Plugin Author EDGARROJAS

    (@edgarrojas)

    something like this:

    Math.min([Gross Income], 2000) OR RNFRound Math.min([Gross Income], 2000)

    Instead of [Gross Income] you should place the field that you want to use there.

    Regards!

    Thread Starter manpasand

    (@manpasand)

    Used RNFRound Math.min(Gross Income, 2000)

    Getting error “unexpected identifier”

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Do you get that error when you execute the form?

    Thread Starter manpasand

    (@manpasand)

    Input field shows undefined

    Plugin Author EDGARROJAS

    (@edgarrojas)

    could you send me a link to your form please?

    Thread Starter manpasand

    (@manpasand)

    I have no problem but I will ask from the client first. Will update you soon.

    Thread Starter manpasand

    (@manpasand)

    @edgarrojas Thanks for your help… it works now by using Math.min(Gross Income, 2000)

    May be spacing problem my end.

    THANKS FOR YOUR TIME & GREAT HELP.

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Ah great!

    You are welcome =), let me know if you have any other issue or question.

    Regards!

    Thread Starter manpasand

    (@manpasand)

    One small question…how can I add $ (dollar) sign in the amount input fields?

Viewing 15 replies - 1 through 15 (of 16 total)

The topic ‘Amount Field – Conditional’ is closed to new replies.