Default values for new record based on where created

My app, being designed for scheduling and timesheet management, requires two data entry paths.

Path 1. If a user makes a new timesheet entry (for an unassigned job) he would select his name from the list of workers, then add a new record to the timesheet table. In that case the default needs to have the default date set for today, the start time set at 7:00, end time set at 15:06 and break time as 30 minutes.

Path 2 If the supervisor is building a schedule for the week he would come from the Jobs table, select a date, select an employee and add a new timesheet entry with the selected date and start time with no end or break time.

Is there any way to set defaults (initial values) based on the path used to get to an input form or send a parameter to the form that can be used to set the defaults?

Rob

Solved Solved
0 15 2,324
  • UX
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

Not on the path to the form, but the column logic can examine the form name using CONTEXT(). For instance, the Initial value expression for the Date column could be:

IFS(
  ("Supervisor Form" <> CONTEXT("View")),
  TODAY()
)

Start Time:

IFS(
  ("Supervisor Form" <> CONTEXT("View")),
  "07:00"
)

and so on.

See also:

View solution in original post

15 REPLIES 15
Top Labels in this Space