Hi Glide Community
I’ve just started using Glide and am very impressed. I’ve started on my first app but am stuck. Apologies if this is a rookie error but help would be much appreciated!
Context - I am building an app to help the Ukrainian refugee community that I support, to select donated furniture when they move into their own houses.
They start with the Category menu page and select which category of items they are looking for:
When an item has an Item status of “Available”, 3 actions are possible: “Take”, “Reserve” and “Deliver” – you can see these buttons at the foot of the page.
I am trying (and failing) to program the correct actions for these buttons where a form will be displayed. For example, for the “Reserve” button, I want to capture the name of the person who the item will be reserved for AND then update the Item-status to “Reserved”. When this button is clicked the following form appears:
I enter the name in the “Reserved by” field and Submit. Note that in the bottom right I have set the Item-status to be “Reserved “. I want the “Reserved by” cell to have the field value entered from the form i.e. “Nadiia Z”. However, the Item page is redisplayed and neither of the data fields are updated.
I suggest you to create a workflow containing a new screen (action).
Create a helper table containing only the fields you need (set these Columns as user-specifics). Add a single empty row.
Then it that new screen, add the fields you need to fill.
Add a button that will trigger another workflow:
1- Set columns value on the reservation row
2- Clear columns value of the helper table
Or you could keep track of all submissions in a new table, use a form container to add rows in that table. But add an onsubmit action that will set the column value of the specific item in the main table.
Why do you need a helper table here though? Wouldn’t a set column value in the same row be enough?
I imagine a confirmation screen that is a “Show New Screen” > overlay action on the same row, then write some text like: “Are you sure you want to reserve this item?”.
A button block would contain two actions: Cancel would close the overlay, Confirm would set the signed-in user’s ID (not name, to make sure it’s unique) to the “reserved by” column.
That is a good point.
Well, the edit form screen of the items table is probably already use to edit the actual item. So If you use a “show new screen” action to show a form that a user can fill additional data, the helper table is required.
But if you are only getting the user id, yes, doing what you said would work.
I think that @Paul_Nixon want (correct me if I am wrong) to allow refugees to reserve for other refugees. Or allow other people to also reserve something for a refugee.
I don’t understand this part. You don’t need an edit screen, the set column values should be enough to alter the “reserved by” column.
If Paul needs user A to reserve for user B, he can have a user-specific column to hold the temporary user ID, then on a button click, set that to the “reserved by” column.
That would work too, but what if he needs that for multiple data? Would it be one new user-specific column per field? I would say yes.? Edit screen or new screen in that case? New screen still right?
Yes, I don’t know what his intention is when he has 3 buttons, but if he has 3 columns for “taken by”, “reserved by” and “delivered by”, for example, then that’s a direction he can go.
The new screen is more for aesthetic to be honest, with the easier to set up button block. The edit screen leaves you with the default cancel/submit button, and as you said, probably he would reserve it for the actual edit of the item.