0

Auto-populate tax depending on another dropdown field selection?

I'm wondering if it's possible to tell Ninox to apply tax based on my 'job type' dropdown field? For example, if  I pick 'shipping' that would be taxable, but 'design' (as a service) isn't taxable in my case. Attached is a screen shot to help visualize.

Even better if I could have it default to 10.1%, then if I need to change it I could.

Thanks!

3 replies

null
    • Daniel_Berrow
    • 2 days ago
    • Reported - view

    Hi Taylor,

    There are various methods you could use for this, the option i'd look into is using a switch case

    https://docs.ninox.com/en/script/introduction-to-ninox-script/set-conditional-statement/set-multiple-conditional-statements

    'Tax rate' := switch 'job type' do
    case 1:
    10
    case 2:
    20
    default:
    10.1
    end
    

    Put a script like this in your update trigger in job type, and fill in your tax values for each case it needs to be different, and then your default can be 10.1 for ones not needing anything else specific

      • Taylor_Hanson
      • 4 hrs ago
      • Reported - view

       Thank you! I'll give it a try.

      • Taylor_Hanson
      • 1 hr ago
      • Reported - view

       so I got it to work using a formula field, but can’t get it to work using a number field. The only issue with the formula field is that I can’t type into it if I need a misc percentage.

      Here’s my formula, any ideas? 
       

      'Tax Test' := switch 'Job Type' do
      case 1:    ""
      case 2:    "10.1"
      case 3:    "10.25"
      case 4:    "10.1"
      case 5:    "10.0"
      default:    ""
      end

      ‘Tax Test’ is the number field I’m trying to get to work.

      Thanks!

Content aside

  • 1 hr agoLast active
  • 3Replies
  • 24Views
  • 2 Following