Data Entry on AppSheet

Hello AppSheet Community :slight_smile:

I am creating an app to enter test result data. I would like to enter half the information in the “Test Entry” view, then enter the other half in the “Result Entry” view. This means that the “Result Entry” view should take the first entered row and from “Test Entry” and indicate that the information being entered corresponds to that entry. So I created a parent-child relationship between “Test Entry” and “Result Entry” with Is A Part Of ticked ON. But the row from “Test Entry” does not populate to “Result Entry.” What should I do? I also tried ticking Is A Part Of OFF but that didn’t make a difference.

Thanks.
Tiffany

If this is a 1-to-1 relationship (every test has one result), then you don’t actually need two tables. You can just use Slices to split the form into two parts. Then all your final data is together in one row.

You would only need two tables if there can be more than one Result per Test.

This is for something else. It controls if the child records get deleted with the parent.

3 Likes

Thank you @GreenFlux

How do I make a form out of a data slice? Right now the form appears empty.

UX>Views>Add New View,

Then select Form for the View Type, and choose your SliceName for the Table.

1 Like

So when someone enters the second half of the information into the second slice, I want some kind of identifier linking them back to the first half of the information, so they know that what they are entering corresponds to that first half. Does my explanation make sense? How do I do that?

I tried changing the Editable_If constraint but that just makes the column invisible for the second half. I want the column to indicate the relationship between the second half and first half.

How much data do you want to show from the first half? Just a label of some kind, or all values?

You could use a Show column to pull certain info from the first half and display it at the top of the second form.

Create a virtual column and set the Type to Show, then set the Content to whatever columns you want. Then add that virtual column to the top of the column list for Form2’s Slice.


If you want to display all the data from the first half, then a single Show-Column won’t work very well. You could CONCATENATE() all the values but it wouldn’t look great. Or you could add multiple show columns.


If you want to show ALL VALUES from Form1, this post explains another technique that could be used to display Form1 results in Form2 as a child table:

2 Likes

Thanks @GreenFlux

I attempted what you suggested and AppSheet returns the correct row but the wrong value within the row. It returns the key of the row when I want to return the Well Position of the row. Did I write my expression wrong? How should I change my expression? If you look at the screenshot below you will see it shows a uniqueid() value. I want it to show 9-3A, which corresponds to that row with that key value.

Here is the expression I wrote. I explicitly specified I want the well position value but it still gives me the key value.

The data you want is in the same row, correct? So you don’t need to use MINROW() in your Show Column’s Content Expression. Just the column name [well position].

Yes I tried that first. Do you see how one half is populated in the top row and the other half is populated in the bottom row? In practice I want both halves in the same row. I tried the slice approach that you suggested and this is the result.

It looks like you’re adding a new record for the second half of the form instead of directing the user to a form to finish the first row.

Use LINKTOROW([Key], "Form2Name") to send the user to the second form instead of the system generated Add button for the 2nd slice.

You should probably change the permissions for the second slice to UPDATES ONLY so new rows don’t get added.

1 Like

Thank you @GreenFlux!
I tried updating the permissions of the slice and this happened

I don’t know how to implement the first suggestion with LINKTOROW(). The first halves will be entered in batches and the second halves will be entered in batches as well.

It looks like you’re still trying to add a row to the 2nd slice instead of updating an existing row.

Add a new Action, Type: Go to another view in this app, then use the LINKTOROW() expression for the target view.

Then you need a place for the user to view entries from Form1, and click this button to take them to Form2 and finish updating the same row.

If you set the button to display Inline then it will display on each row without having to go into detail view to find it.

Thanks @Greenflux. Here is the Action I created and the result when I try to use the form.

You have to reference the key-column for that row. Replace the word key in LINKTOROW() with whatever you used for your key.

1 Like

I named my key column Key.

You left off the [ ] square brackets.

LINKTOROW( [ Key ] , “Enter AGID Results”)

2 Likes