Adding mileage options to timesheet

Hello again!!
I'm looking for some insight on how to add a mileage input on the employee timesheet! In doing so will it automatically update the table? or will things get a little buggy?

Thanks in advance!!

Hi @Hayd-c5a9,

Thanks for this question too! :slight_smile:

The great thing about the Honeycode templates is that you can customize them to better suit your needs, by modifying the app in Builder and data modeling in Tables. You can also explore them to better understand different ways to build apps.

If you'd like to add a mileage input to the Timesheet template, you will need to update both the app and the tables. (To answer your question, they do not automatically update each other. The app is a front-end display of the data you have in your tables, which you can create in Builder).

Let me show you how:

First, you would make a new Mileage column for both the Timesheet_Entry and Timesheet_Summary tables.

I added a Mileage column in the Timesheet_Entry table:

and a Total Mileage table on the Timesheet Summary table:

In the Employee app on the Timesheet details page, add an editable data field where users can input mileage:

You then will want to update the "Add" button's automation to write the mileage to the Timesheet_Entry Table:

In the list of the entries, you can add a display of the mileage entry like this:

For the totals on the timesheet, you will want to do the sum of all the mileage of the entries. So you could copy and paste the hour total variable, and in the new variable, change it to total the mileage rather than the hours:

And finally, you'll want to update the timesheet submit button's automation to write the total mileage to Timesheet_Summary table:

Now this is how your app will look, and it will also write the data accordingly to the tables:

The form with the mileage input field:

And the entry and totals updated on the screen:

For the manager app, you can also add fields that display the total mileage and entries, like this:

Hope this helps, and that you can better see how apps are built :slight_smile: Let me know if you have any further questions on this. :honeybee: