Autofill Last Created Field

Hello,

I am needing the "first name", "last name", "patient ID" from a signup form to auto fill into a questionnaire form.  I can't have a dropdown list because patients cannot be allowed to view other patient names.  Basically, I don't want a patient to have to enter name twice.  Once they fill out the new "signup" form, they are taken to the questionnaire form and their name and ID is autofilled into the field within the questionnaire.  Please assist!  Thank you so much!

Solved Solved
0 10 218
1 ACCEPTED SOLUTION

I see the confusion.  There are dedicated actions types meant for navigating to views and you set the expression based on what type of view how you want it to open. Below is the action you need to create.

Note that this action should be attached to the Signup_Form.  There is a property on that From view named "Form Saved" - image below.

Navigation Action to Create

Screenshot 2022-12-06 at 5.57.00 PM.png

 

 

 

Example expression in action

Screenshot 2022-12-06 at 6.01.07 PM.png

Attach the new action to the SignUp_Form

Screenshot 2022-12-06 at 6.12.27 PM.png

Once you have the action created and attached, when you Save on the Signup_Form, the app will automatically transitions to the Questionnaire_Form and fill in the fields configured in the expression.

 

View solution in original post

10 REPLIES 10

Its not clear what or if you have anything built yet.  So...in AppSheet what you would want to do is:

  1. create an action that navigates to the Form using the LINKTOFORM() function.  This function allows you pre-fill in one or more Form columns from the current row.
  2. attach the newly created action to the Form Save property of your "Signup" form.

The idea is this...a user fills out the Signup form and taps Save.  This triggers the attached action which will open the Questionnaire Form and pre-fill the patient details based on the data saved in the Signup Form.

I don't know your experience level.  So please ask your questions on anything above to get more help with unfamiliar implementations.


@WillowMobileSys wrote:

create an action that navigates to the Form using the LINKTOROW() function.


*LINKTOFORM()

 

Yep!  Correct link wrong text!  Thanks!

Thank you!  What else do I put into the LINKTOFORM()?  The "New Signup" has the column names of "Patient's First Name", "Patient's Last Name" and "MRN".  I wont those fields to autofill on the "Questionnaire" table with columns of the same name.  Does that make sense?  Also, do I put LINKTOFORM() in the signup table or the questionnaire table or both?


@jeffbarra wrote:

Also, do I put LINKTOFORM() in the signup table or the questionnaire table or both?

The idea I presented above was to immediately navigate to the "Questionnaire" Form the "New Signup".  This is done by creating an action that navigates to the "Questionnaire" Form and attach it to the "New Signup" Form so it happens automatically when Save is tapped.

This is only one approach.  Is this what you wish to have happen or was there something else you had in mind?

I do have it setup to navigate to the questionnaire after new signup submission.  I just can't figure out how to have the first name, last name and mrn auto fill into the questionnaire field using the LINKTOFORM() expression.

If you were to click on the link given above (or here) there are several examples in the article.  Here is one below.  You would set this as the expression in the Target property of the action you are creating and updates the parameters to those for your use case.

LINKTOFORM("Orders_Form", "Customer ID", [_THISROW], "Delivery Address", [Customer Address]) 

The first parameter is the name of the Form you wish to go to - "Questionnaire".

The remainder are name - value pairs.  the first pair is required - all others are options.  The names, in quotes, are the column names (not the display name) on your Form.  The values are columns from the existing row or expressions that provide the value to assign to the Form column.

So, in the example above

  • "Orders_Form" - the name of the Form view to go to
  • "Customer ID" - a field on the new Form
  • [_THISROW] - value assigned to "Customer ID"
  • "Delivery Address" - a second field on the new Form
  • [Customer Address] - value assigned to "Delivery Address"

I hope this helps!

Screen Shot 2022-12-06 at 3.34.08 PM.png

LINKTOFORM("Signup_Form", "Patient's First Name", [_THISROW], "Patient's first name", [Patient's First Name])

I don't understand the last 2 parts after [_THISROW].  

It goes to the questionnaire upon submission but doesn't prefill the "Patient's First Name" 

I see the confusion.  There are dedicated actions types meant for navigating to views and you set the expression based on what type of view how you want it to open. Below is the action you need to create.

Note that this action should be attached to the Signup_Form.  There is a property on that From view named "Form Saved" - image below.

Navigation Action to Create

Screenshot 2022-12-06 at 5.57.00 PM.png

 

 

 

Example expression in action

Screenshot 2022-12-06 at 6.01.07 PM.png

Attach the new action to the SignUp_Form

Screenshot 2022-12-06 at 6.12.27 PM.png

Once you have the action created and attached, when you Save on the Signup_Form, the app will automatically transitions to the Questionnaire_Form and fill in the fields configured in the expression.

 

YOU ARE AMAZING!!  So helpful and it worked!!  Thank you so much!!

Top Labels in this Space