Call form response from current submission

Hi all,

I am pretty new to AppSheet. Please excuse me if this is a well known issue, I have spent some hours trying to search the community form. I have a feeling I am not using the correct keywords.

I am trying a make a form which will pre-fill some responses as the “prefered” value based on the user. But these responses need to be editable…so dereferences method does not work (at least I have not been able to make the response editable when using dereferences).

Is there a way to pull selected responses before the form has been submitted? I.E on another platform that I am using, there are these microflows which allow you to execute certain actions when a field has been edited…is there something like that in AppSheet?

Could someone please point me in the right direction?

Solved Solved
0 8 335
1 ACCEPTED SOLUTION

If the user is filling out a form for Parent_Table:

  • Assuming User is a Ref to Users, to auto-fill User_Office from User, set the Initial value expression for User_Office to:

    [User].[User_Office]
    
  • Assuming User_Office is then a Ref to Offices, to auto-fill User_State:

    [User_Office].[State]
    
  • And for User_Country:

    [User_Office].[Country]
    

View solution in original post

8 REPLIES 8

You can create a Behavior that will appear as a button.

In this Behavior
for option “Do This” Select "App: go to another view within this app

For Target enter "LINKTOFORM(NAME_OF_FORM,[ColumnA], “Your Value for Column A”, [ColumnB], “Your Value for Column B”,…etc

This will prefill those values for you.

You can read more about it here

Use the same deference formula you tried before, but enter it in the Inital_Value instead of App Formula.
3X_2_b_2b76aeca1f9b9dc07816a574d3c60832112bce37.png

That should auto-fill with the value you want, but then allow the user to edit the value if needed.

I do that all the time, pulling in data from my Users table. Some places I allow the user to edit the pre-filled data, other places I don’t.

For example, this is in the Initial value property of an enumList type of column. It will pre-select the country or countries stored in the users table for the current user. The user can then edit as desired.

LOOKUP(USEREMAIL(), “Users”, “USER_EMAIL”, "COUNTRY_GEO_NO”)

Expanding @Lucinda_Mason and @Mark_Taylor idea, would it be possible to next a LINKTOFORM() with in a LINKTOFORM? Or is there any other approach to accomplish this?

Here is the schematics of the information I need to pull. I am trying to autofill (via the Initial Value formula) User_Office, User_State, and User_Country columns in Parent_Table.
User_Office is coming from Users table. While User_State and User_Country are coming from Offices table via Users[User].

You can do that like this

Two Virtual column in “Users” for State and Country
Users(VirState) = Lookup([_thisrow].[User_Office],“Offices”,“Office”,“State”)
Users(VirCounty) = Lookup([_thisrow].[User_Office],“Offices”,“Office”,“Country”)

The three Virtual Columns in “Parent_table” for Office, State, and Country
Parent_table(VirOffice) = Lookup([_thisrow].[User],“Users”,“User”,“User_office”)
Parent_table(VirState) = Lookup([_thisrow].[User],“Users”,“User”,“VirState”)
Parent_table(VirCounty) = Lookup([_thisrow].[User],“Users”,“User”,“VirCountry”)

you can read more about it here

If the user is filling out a form for Parent_Table:

  • Assuming User is a Ref to Users, to auto-fill User_Office from User, set the Initial value expression for User_Office to:

    [User].[User_Office]
    
  • Assuming User_Office is then a Ref to Offices, to auto-fill User_State:

    [User_Office].[State]
    
  • And for User_Country:

    [User_Office].[Country]
    

Thank you Steve.

Steve
Platinum 4
Platinum 4
Top Labels in this Space