How to pre-fill a form based on a entity detail page

tloder
New Member

In my app, I have a dog list, dog detail, walk form, walk list, walk detail, and walk inline views.

The image below is the dog detail page. I have added an action to this page, the + icon next to the dog name. This links to the walk form where I can select the name of a dog from a list. I would like the action to behave the way it does when I tap the word โ€œNewโ€ in the Walk inline history. Tapping new brings up the same exact view (walk form) but prefills the dog field with the correct dog name depending on which dog detail page I was previously on. This was configured for me when I started building the app, I canโ€™t figure out why the New action behaves differently than the + action

0 4 1,017
4 REPLIES 4

Steve
Platinum 4
Platinum 4

tloder
New Member

Thanks Steve,

I have tried a few variations on the formula below where form view name = โ€œactivity_formโ€ column name = โ€œnameโ€ column value = โ€œnameโ€

LINKTOFORM(activity_form, [name])
LINKTOFORM(activity_form, name, [name])

they both test ok, link to a blank screen.

Activity_form records walks in a google sheet called โ€œwalksโ€

The column I want to pre-fill is called โ€œnameโ€ and is pulled from a sheet called โ€œdogsโ€

I have tables named Dogs and Walks respectively. I am not sure which one to associate with the form.

I wish I could just find and copy the action that the โ€œnewโ€ link in the screenshot creates, but I cannot locate it.

Any help is appreciated. I am very inexperienced in formulas and appsheet in general, but I am learning.

Associate the form with the table to receive the data collected by the form: Walks. You probably have a system-generated Walks_Form form for the Walks table. Iโ€™d recommend using that rather than creating a new form, unless you have a particular need for a different form configuration.

That actually wouldnโ€™t give you what you want.

2X_d_d83ea3196cbc1fba50171575d23afe65b0d203ef.png


(Change Activity_form to Walks_Form if you took my advice above.)

From everything youโ€™ve said about your app, I suspect youโ€™re using the Name column as the key column of the Dogs table. If so, you may want to reconsider that. A key column value must be unique within that column of that table. If Name is the key column for the Dogs table, you could not have two different dogs with the same name.

tloder
New Member

I was using similar formulas. I made a video to show you the results. Maybe it make it clear what I want to do. Maybe itโ€™s not possible.

Youโ€™re correct I was using the name column as key, because it wouldnโ€™t let me use _rownumber. I added a new column called key, that is blank in the google sheet. If I make that the โ€œkeyโ€ it doesnโ€™t display any results in the deck view.

Top Labels in this Space