1 Reply Latest reply on Apr 24, 2013 1:50 AM by symbister

    Field to override another field



      Field to override another field


           I’ve made a small application to keep track of my receipts and see how much VAT I eventually will get back.

           Sofar I have 3 fields:

           “total amount receipt”

           “total VAT”

           radiobuttons for VAT and noVAT

           The radio buttons works as my “VAT-switch” so whatever number I put in “total amount receipt” if switched to VAT it takes 20% and shows it in “total VAT”

           I now have come across when you sometimes buys from overseas DHL will pay for your VAT in customs, and you have to pay DHL. Where you will be able to deduct whole amount, except from a small administration fee.

           So I need to have a field to put in a “custom VAT” so If I have any special VAT circumstances I can put in the VAT amount myself which then will show up in “total VAT”. Still I need to put in the total receipt amount in “Total amount receipt” and still switch on the VAT switch, though it shouldn’t take 20% of the number in “Total amount receipt” instead when anything is put in the “custom VAT” field it should use that instead.

           Just not sure how to set this up.

        • 1. Re: Field to override another field

               So you need an extra field as 'customvatpercent' and your calculation field will need to use that field if the 'VAT-switch' is set to custom...

               something like:

               Total VAT = Case ({VAT-switch = "VAT" ; 20; }VAT-switch = "NoVAT" ; 0 ; VAT-switch = "Custom" ; customvatpercent ; 20)

               I've put curlies round the first conditional as you don't really need this as the CASE will default to 20 (the last argument) if VAT-switch is set to anything other than NoVAT or Custom

               VAT-switch will need to be a text field with value list VAT, NoVAT, Custom - radio button as you say, or other single choice selector, drop down or pop up