How to pass values to a system view form

I have 3 tables: Service Calls, Customers & Sites.

In Service Calls table there are several columns two of which are [Customer ID] & [Site ID]. Both are references to the respective tables.

Sites has the column [Customer ID], it is also a reference to the customer table.

When entering a new record in to the Service Calls form I select a [Customer ID] from a drop-down. Next I can select a [Site ID] from a drop-down. The drop-down options for [Site ID] are filtered to only allow choices of sites that reference the selected customer.

All is good so far…

When I need to add a site that does not yet exist I choose “new” from the [Site ID] drop-down. This opens a form for a new row in the table Sites.

On this form the [Customer ID] field is blank and I need to select the [Customer ID] again. How can I pass the value of [Customer ID] from the current row of Service Calls to the new site form so it is not necessary to choose the customer again?

As you have a REF, you can use a de-ref expression in your Initial Value

Thanks for the quick reply.

Is there any chance you can be more specific? Everytime I try to dereference I get a nothing value (i.e. The Customer ID field in the new Sites row will be blank.

I think the issue is that I get half way through the Service order entry form and then I have to add a new site. For what I can tell no row has been added to the Service Calls table by this point.

You can read more here

1 Like

Thanks again for the response. I have read both articles… multiple times and I just read them again. Is there any specific section that I should narrow in on? Because nothing is jumping out at me.

I’m not sure I am explaining my issue very well…

When I create a new entry in the Service Calls table, sometimes I need to create a new Site.

The Form is set up such that the Site column will not display until a Customer is selected.

In some instances I need to add a new site because it is not already added to the Sites Table and associated to the currently selected Customer. (keep in mind this is all entered in the Service Calls form at this point)

The way I do this is I select the Site column (on the Service Calls form) and choose ‘New’ from the drop down list. This will take me to a different form automatically. (I do not believe that any of the information previously entered in the Service Calls Form has been saved in a table at this point.) This form is the Sites Form and it is intended to create a new row in the Sites Table.

One field in this new form (for Sites Table) is Customer. In both the Service calls Table and the Sites Table the Customer column is referencing the Customer Table.

The Sites table does not Reference the Service calls table hence why I am asking how to send data rather than how to reference data.

I have not come across anything on how to modify the behavior of the ‘New’ option in a reference drop down list…

Advise checking out this post from @Steve

1 Like

Never mentioned using any inline views.

There’s really no easy way to do this.

1 Like

Thanks Steve,

Is this a limitation of Appsheet or poor app design?

Not necessarily either - it’s more a bug really.

I remember when they first introduced that ability (to add a new reference while filling out the form); there was intention to try and fill as much as possible from the form you previously came from.

But over the years things have evolved into a more “standardized system of processes” and this has resulted in that behavior not functioning that way anymore.

My solution to this problem is to change the interaction method; instead of doing things through the form, see if you can find a way to do everything outside the form for the most part - using actions.
There are plenty of times when you’ll need to migrate into the form to capture some data, but there are other times when using the detail view (with it’s inline views) along with actions can really change the interaction flow.

If you were on the detail view of your “new record” with an inline view of all the related sites, then you could just press the system generated “add” button to add a new site - or use your own custom actions to accomplish something using LINKTOFORM().