Hi Everyone, I'm using Appsheet to build a s...

Hi Everyone,

I’m using Appsheet to build a solution for a company I work for - taking our timesheets digital! One of the problems I have with this is with permissions as the timesheets go through the review process. To illustrate this, here’s basically the three stages.

  1. Employee has a timesheet. He can edit the date when he creates the new timesheet. Once a new timesheet has been created, he can create many Line Items under that time sheet. So 1 Timesheet might have 4 line items which are basically job number, time, work code.

To be clear, Timesheets are in one table, line items are in another table. Each line item is tied to a specific timesheet with a TimeSheetID.

In order to do this, the Line Items must be editable. HE has to be able to add, update, delete the line items in Today’s time sheet. At this point I have a Column (Status) which reads Draft.

At the end of the day, the employee clicks the Submit button.

  1. Once the employee clicks Submit, the status is changed from Draft to Submitted. Here’s where I’m having trouble. Since the employee submitted the timesheet, I still want him to be able to view it, but I do NOT want him to be able to edit any of the line items. My solution to this was to create a slice called Submitted, that retrieved the employees Timesheets with Status Submitted, as Read Only. Unfortunately, I’ve found that “Read Only” permission doesn’t cascade down to the Line Items. The employee can no longer edit the date on the time sheet (Great), but can still edit the line items. Needless to say this isn’t how I want the Timesheet to work.

How would I allow an employee to view his submitted timesheets, but not be able to edit any referenced line items once the status on the Timesheet has been changed to submitted?

0 3 342
3 REPLIES 3

One way is the Editable_If option. You could try to use a formula like [TimeSheetID].[Status]=“Draft”.

You probably need a grouped action… When they are looking at the detail of their time sheet, click the “submit and lock” group action… (I would put a confirmation message on it.) (I would have a column in the parent and the child table yes/no [status_employee_submitted] initial value FALSE

First action - data change - parent record employee status to flag to “TRUE” Second action - reference action - change all the children to “TRUE”

https://www.google.com/search?q=appsheet+reference+actions&oq=appsheet+reference+actions

As you can see there are lot of different ways to built that functionality. One simple way is if you hide that system EDIT action button with the same formula [TimeSheetID].[Status]=“Draft”. It will show the action button if the status is “Draft” and they can edit the inline record.

Top Labels in this Space