I’m working on a app for checking in parts. The parts have the following items
Job Number
– Serial Number
– – Part Number (and more data)
I would like the user to be able to pick the Job or Serial number and then only have to pick it again if they need to change it. I don’t want to have to put in the Job & Serial number in the form every time.
I think I need a user variable and a row based slice, but I haven’t found a good example on how to do that.
Anyone have an example or can share how to do this?
I don’t know any good sample apps, but the general idea you’re looking for is a very common build methodology in AppSheet.
- Create a “User” table, with at least the following fields:
- [User_Email], [UserID], (and since you want a place to store a user variable) [User_Selected_Job]
- Create a slice of this table: Current_User
- For the slice formula, use something like this:
USEREMAIL() = [User_Email]
This will give you the individual record that belongs to the particular user that’s currently logged in. This is a very handy way to grab certain variables that might be stored in the user table, things like:
- Authorized Facilities (for use in security filters)
- Phone number
- User Role (for additional security and functionality restrictions)
- etc.
Now for your scenario, I would actually build a second slice to use for the interaction.
- For this slice, I would only include the [User_Selected_Job] field
- Create a form view for this, with the “Auto Save” turned on
- this way once someone makes the selection, the form automatically saved - saving the user from having to hit the save button.
- From here, you can also make use the form save event action to take control over what happens when that form is saved.
- You could insert a navigation action to route someone to the job that they selected, for instance.
I’m not aware of any sample apps that show this functionality though, maybe someone else does?
3 Likes
Thank you for this and the video. It helped me get this functioning.
2 Likes