0

Formula to be linked to a choise field

Hello, 

Could someone point me in the right direction please :). I have watched several Tutorial videos but don't seem to find the one explaining what I want to do. 

So I have a table for my clients. Each clients have a VAT status through a choice field (Like 'registered' if they have a VAT number, 'not registered' if they don't have one, 'N/A' if not applicable and 'in process' if their VAT number is in the process of activation).

On my invoice Table, I have created a VAT formula to calculate the VAT. If the client VAT Status is 'Registered'or 'N/A' I would like my formula to consider the % of the VAT as 0. If the client VAT Status is 'Not registered' or 'In process' I would like my formula to consider that the % of the VAT is 23% so my formula would be 'Total Fees' * 0.23.

Thank you  

2 replies

null
    • Nick
    • 4 yrs ago
    • Reported - view

    In the Invoices table put something like this in Trigger after update:

     

    if Customer.'VAT Status' = 1 or Customer.'VAT Status' = 2 then
    'VAT Rate' := 23
    else
    if Customer.'VAT Status' = 3 or Customer.'VAT Status' = 4 then
    'VAT Rate' := 0
    end
    end

    • maroon_banana
    • 4 yrs ago
    • Reported - view

    Hi Nick, 

    Thank you for your help. I have tried this but it didn't work. 

    I have tried so many different things but can't figure out what to do.. This is so frustrating

Content aside

  • 4 yrs agoLast active
  • 2Replies
  • 920Views