Pass Deck Values To Form When Opening

I’m setting up a form for my organization that allows members to essentially buy items, more specifically put their info and what they’re buying into a form to dump into a table that we can use as a reference for what we need to bill people. (Someone wants to buy a soda or something from the soda fridge, we get an entry in a table that says [THIS_PERSON] bought [1 SODA], etc).

The app gives a deck view of purchasable items created from a data slice of a main inventory list. When they click on one of the cards in the deck, it opens a form that is intended to collect information about what they’re buying so we can bill them later. This works, tapping / clicking on an item in the deck opens the intended form, I don’t need help with that part.

I would like this form to auto-populate the selected item from the row of the deck that was clicked / tapped and the price of that item. The Item Purchased column in the Purchase Orders table the form is adding data to is a Ref enum that adds its options from the main inventory (i.e. it’s looking at the main inventory table and picking items that we actually offer for sale, and excluding ones we don’t).

I am currently opening the form via a LINKTOTABLE() in an action tied to the inventory table (since the view is based on a read-only slice of that table), but I can’t seem to figure out what I need to do to actually get the information to set the initial value in the form when it opens.

Here is the last formula I entered for the navigation target in the action that opens the form:

LINKTOFORM("Purchase Orders_Form", Purchase Orders[Item Purchased], [_THISROW].[Name], Purchase Orders[Purchase Amount], [_THISROW].[Member Sell Price])

I’ve tried a couple variations of this, using Row_ID, etc, but I can’t get it to set anything aside from erroneously dumping the new Row_ID into the Purchase Orders table’s Item Purchased field.

Hi @Jon_Gregory, Welcome to the AppSheet Community!

Unfortunately AppSheet does not support row-selection capabilities - at least in the way you are attempting. In other words, there is no built in capability that allows the app to select a set of Product rows in one view and then pass that set of selected rows to a Purchase Order Form View.

Looking at your desired use of the LINKTOFORM() function, you would want to take advantage of AppSheets built-in Parent/Child structure. The process with this structure would be to open the Purchase Order form and then add the desired Products to be purchased.

Your Purchase Orders table would be a parent table and then nested within this would be a Purchase Details table. This Purchase Details table tracks the list of items purchased together, their Price at the time of the order, possibley a product description and which order these items belong to.

To get you started, please refer to this article below and pay special attention to the section " Express ownership between tables". This is how Parent/Child relationships are established. It’s much easier than it appears to be

Lastly, AppSheet is a flexible system and there are many ways to customize implementations and create workarounds to provide a different user expereience if desired - with compromises, of course.

I would focus on creating the parent child relationship first and then you can focus on improving that usges if needed.

I hope this helps!