Cell value based on numeric increments

I have built an app that records vehicle maintanance for our fleet. mileage is put in with every gas/repair expense recorded. I’ve been trying to figure out two things…
First… What expression/action can I use if I wanted it to let me know when its time to change oil in 7500 mile increments? Every 7500 miles I would like it to change the status of another column so I know its time…

Second… How can I subtract the current mileage that is being put in from the previous mileage put in from the last automobile expense so I can calculate the miles driven?

Thanks in advance for the great job this community does… I pretty much live on this place anytime i have questions…



increments like that benefit from the use of Modulo, in appsheet that’s the MOD() function. Here’s an example app:


I admit that I built it perhaps in a rush, so there could be errors in there - or maybe there is a better math calc to achieve it. But there’s a “warning” virtual column that says “when we get to 5% or less of the increment, throw warning, else throw OK”. Of course, AppSheet can’t force your audience to change their oil… :slight_smile:

For your second question, the “mileage” data in this app has an example calc that does this. Again, just one possible idea.

I used the “Create from an Idea” data source (aka AppSheet “spec”) for this app, btw.

Your Mileage May Vary with this example… pun intended. Maybe some other folks here could “tune up” this app.

Hope thid helps!

1 Like