I want each line to either have mileage or an expense amount, but not both.
I have the total for the line to calculate mileage value if there is an amount in the mileage column or put in the amount spent, but I want to limit the user to only putting a value in one column or the other.
Columns in form are:
Date, Description, Miles, Amount, GL Account, Total
Miles and Account are formatted as numbers.
My total column calculation if then script works but does not prevent using both.
Can you share file or photo of your fields?
The way to achieve that is to have each field reset the value of the other when filled. Let's say they are called Miles1 and Amout1. As the custom validation script of Miles1 enter:
if (event.value) this.resetForm(["Amount1"]);
And under Amount1 enter:
if (event.value) this.resetForm(["Miles1"]);