Edit a Row from a Form

I created a form and just allow me to add new rows. The table has a two columns cocatenated key [Event Date] & [Site] . So when i select one value of the columns (25/07/2021 and Mokambo Bar), that was a previously added record row, the form does not display other columns data for Edition. And when you try to save, a message pops There is already a row with the key 25/07/2021 Mokambo Bar.

My question is why the form does not show the record previously added and allow to edit other column data.

0 11 2,092
11 REPLIES 11

Hi @yastaaa
If you want to edit the data as well as add then you need to allow Updates on your table.

Thanks but Updates are allowed in the Table. So that is not the solution.

Steve
Platinum 4
Platinum 4

Because thatโ€™s not how AppSheet works. If you want your app to work that way, you need to build it to do that.

See also:

Ok. Thanks. So the answer is that forms in appsheet are for new records (rows) and you cannot move to other records (rows) for editing (updates) with a form. I can only edit with Quick Edit Columns in another Type of View. ?

Forms are for editing rows, whether new or existing. To edit an existing row, the existing rowโ€™s key column value must be known before the form is opened.

So appsheet is for programmers, because simple things that should be pre-programmed in the environment, seem that are not and the turnarounds many times donโ€™t work.

In Microsoft Access that is 25 years old you can move in a form from record to record and edit the record without any problem. Also if you select the key it displays the record data for editing.

Perhaps you should be using Access, then?

Make apps with no-code jaja

I stepped away from AppSheet earlier this year for a more robust solution (first FlutterFlow and now building from scratch). But I came back to update an existing app today and had this exact use case. I'm adding this response here in the event someone else also searches and opens this page and would find a response helpful.

I believe the solution you're looking for would be the LINKTOFORM deep link (see here: https://support.google.com/appsheet/answer/10106538?hl=en). This is a link that prepopulates a form with the existing record fields you want to pass through. You can display this using Behavior/New Action/Go to External Website and providing this link, you can add this as an Event Action for a UX element, etc. I haven't been AppSheeting for a minute, so others may be more specifically helpful here.

In my instance, I didn't need to create a deep link: I have a screen that only displays a background image. No edit button appears on this page, which is the intended design. But I wanted my users to be able to replace this image. So I created a new detail view for the same underlying table and displayed the image field. That view does display the edit button, and they can easily upload and save a new image from there. NOTE: by default, the Detail view sorts by ID, so to ensure the first image that appears is the user's, I added a virtual column to the underlying table called "sortOrder." I set that Number value = 1 if the "Email" field equals the user email, else = 2. So their associated record always is the default one.

I hope you got your app built and that it's serving you well.

Also test LINKTOROW() for your use-case if LINKTOFORM deep link isn't helping

There will be two (2) ways to open the form you created.

  1. Through an "Add" button
    • Clicking the add button will always launch the form in Add mode.  Hence, you cannot retrieve an existing record through this.
  2. Through an "Edit" button
    • Clicking the Edit button will launch the form in Edit mode, but the button will only be available for each row, and cannot appear as a floating/primary button the same way that the Add button does.
    • Most often than not, the Edit button is available as an Action button in a Deck or Table view or in a records' Detail View.

Sometimes, users create a new primary View and select Form view, but the whether the form will open in Add mode or Edit mode depends on how the view was accessed.

My guess is you want the form to act like a search function of some sort where the user enters data of an existing record and then shows you those information?
Without more information, we will be unable to identify what it is you are really trying to do. 

Top Labels in this Space