I am relatively new to Appsheet, so excuse fo...

(Mahesh Gajanan) #1

I am relatively new to Appsheet, so excuse for asking something basic.

I am on a screen related to an student. When the Action button is pressed, I need to create record in another table “Lending” and pre-fill it with name of the student.

Right now,

I am able to create the record but for setting the column value, system lets me set other column but not the Student name. Is that because computed key for Lending table has Student column in it?

How do I achieve this pre-population of value from one screen to another?

(Reza Raoofi) #2

If you are in need of pre-filling Student key in Lending table, perhaps Lending table should be related to Student table via Ref column; in that case a simple approach would be to just set the Ref properly and add Lending rows from inline view in Student’s table.

Another solution would be to create an action button that triggers LINKTOFORM(…) as screenshot below? Also for more details and examples I suggest reading this document: https://intercom.help/appsheet/data/columns/app-column-type-deep-link

(Mahesh Gajanan) #3

Thanks Reza.

Table Lending indeed has Student table referenced using a Ref field.

Let me explain the UI: On the form to do Lending Checkin, after doing checkin for a student, I have an Action defined to do Checkout. That Action should create a new record in the Lending table and prefill with the student currently on the form.

To make this happen, I have an Action defined on Lending table as follows:

  • Copy current Lending record and edit

I was expecting the newly created Lending record to have value of the Student when copy happened but it does not.

So I tried adding this to the Action on Lending table

  • Update Lending’s Student column

But Student column is not available for me to update. I notice it won’t let me update any column on Lending that is Ref and that includes Student.

I hope the long explanation gives a little better understanding of the issue.

(Reza Raoofi) #4

Like I said, I suggest 2 approaches: 1) Always initiate check-outs from Student form so the related lending inline view could conveniently add a new row for check-out using the selected Student ID. You can jump to Students form from Lending form right after a check-in is finished. 2) Have an action triggering proper LINKTOFORM() to allow pre-fill for required columns.

(Mahesh Gajanan) #5

@RezaRaoofi

thanks I used approach #2 and it worked great! Follow up question

Once I link over to the form I want to have user the ability to keep adding more checkout records where I prefill for the current student. That part

should be fine but I am not sure how to add new buttons (“Done” and “Checkout More”) tied to my actions and place them instead of Cancel and Save.

(Reza Raoofi) #6

You could go to the Form’s definition in: Behavior > Event Actions > Form Saved

and select a particular action to be triggered upon save; give it a try; it is not exactly what you are looking for, but it could give you some sort of automation there.