Different view for add vs edit

Hi,

First time poster and recent addition to AppSheet here. I’ve searched this forum and looked at sample apps, but I think that not knowing the proper terminology is what is keeping me from finding a solution. I’m sure that what I’m trying to do is trivial.

Setup:
I have a Request_Form used to add/edit new rows. For simplicity, let’s assume that only one column, called Work, must be input by the user.
I also have a static read-only table, Options. Options has columns, one for each list of possible answers to the Work column in Request_Form, based on whether this new row is being added (for the first time) or edited (and was already existing).
Request_Form correctly pulls in and presents the various Options for Work as a ref.

Question:
How to a create a new view, such as a Requests_Form when adding a new row vs when editing a previously existing row?

Use Case:
How do I have some buttons/choices (a ref to Options) when adding a new row, but different ones when editing a row (after it has already been added)?

I would like to have, when adding, only the choices “Yes” and “No”, but when editing, I would like to have the options “Yes”, “No” and “Completed”. This would permit someone to edit Work to show that it has been “Completed” and that the Work is no longer pending.

Alternate Question:
Perhaps I shouldn’t be editing the Work column in Requests. Perhaps I should be creating a new row in a different table (perhaps using the same uniqueid()/key) to indicate that the Work has been “Completed”.

Thanks in advance for any assistance or insight you can provide.
SJL

Solved Solved
0 3 2,205
  • UX
1 ACCEPTED SOLUTION

Hi Steve,

Firstly, you went above and beyond with your explanation. I few pointers to the functions would have been ample assistance. Much appreciated.

I, too, try to keep UI separate from data as much as possible. The reference to the current (unsaved, not yet in a table) data is what I did not know how to access. This solved it for me.

For the benefit of others, here is what I did in a Valid If check:

IF(
  ISNOTBLANK(
    FILTER("Requests", ([_THISROW].[_ROWNUMBER] = [_ROWNUMBER]))
  ),
  Boolean Requests[Request Options],
  Boolean Requests[Request Options] - Boolean Requests[Invalid New Options]
)

“Requests” is the data, to/from which we are adding/modifying rows.
“Boolean Requests” is another table, which includes lists of valid (in the column “Request Options”) and invalid (in the column “Invalid New Options”) options based on some criteria specific to the app and its data.

Hope this can help someone else.
SJL

View solution in original post

3 REPLIES 3
Top Labels in this Space