Item not being saved to the Google sheet

Hi, I have an app where users go through three questions. When they select the final answer a score appears below . The scores are stored in a column next to the final answer, in a table called “Audit”, the results (ie the three selections they make) and the score should be stored in a “Results” table ( a form). The when I press save, the answers get stored but the Score does not. In the results table the Score is a number, and I am using the Valid If Audit[Score] to fetch the score. The score appears but unless the user selects it before saving it does not get saved. Is there a way in which the score is saved automatically? Ideally I do not want the user to see it at this stage.

A form can only populate columns of a single row at a time within a single table. In order to use the column values of a newly-saved form to set the column value(s) in a different row of a different table, you’ll need to use an action, and attach the action to the form so that the action is performed when the form is saved.

See also:

Thanks, however the value is in the same row. I think that I may be doing something else wrong. I’ve added two screen shots of the tables below. I’ve created a form for the results, and the idea is that users end up entering an item from the column “Options” and I want to record the corresponding score in the results table, along with the selections that they have made. The rest works, it’s just the score. Ideally I would like to hide the score from the form and just record the score in the google sheet.

Use expression: CONTEXT("ViewType")<>"Form"

2 Likes

Thanks, but the issue is that the value in “Score” is not being saved unless it is selected before saving. Ideally I would like the value saved automatically without the user needing to select it.

From your snapshot of the two google sheet tables, for example, the first row of second table: what will be the score if compare to first table? If the score are to be filled automatically.

1 Like

Thanks Heru for your help.

I’ve added another entry to the results to answer your question, see images below. If the user selected “Place and Time in the Garden”, then “Plants suit geography”, then “Fully suitable geographically” the score would be “0”. I’d like to save the score without the user having to click on it and select prior to pressing save, and ideally hide the score.
screen shot app

I can only offer you below suggestion, with conditions as:

  1. I assume that both table is connected to AppSheet

  2. I assume that “Options” column of table 1 is unique

With that, I think you might be able to get the Score table to filled-in by using a LOOKUP expression on the initial value/app formula:

LOOKUP([_THISROW].[Answer], "Table1Name", "Options","Score")

2 Likes

Perfect, that worked! Thanks Heru, your help is much appreciated.

2 Likes