Action to add a new record from existing record detail view with data from this record?

Hello,

I want to add a new record from detail view of an existing record but should take value from Field A of this record and prepopulate the field C of the new record.

I found two relevant actions but none helpful

App: Open a form to add a new record ( not a row level action)

Dint find a way to take the values from the Field A to Field C

Data : Add a new record to another table using values from this row

Tried but not adding the record properly and doesnt open the form at all which is clear from the action name it wouldnt.

I dont seem to find the exact solution.

0 10 535
10 REPLIES 10

Could you please you elaborate , especially โ€œdoesnโ€™t open the form at allโ€ part?. Do you wish to open a form after copying , certain values?

In that case, please evaluate if LINKTOFORM() helps?

https://www.appsheet.com/samples/This-app-shows-how-to-link-to-a-form-and-fill-in-default-values?app...

Thanks for the revert Mr. Gurjar,

Yes . I was just evaluating LINKTOFORM and that should work but I need to have action button in the detail view. I was just not getting how to do the COLUMN VALUE pair coz my value is a reference and not some static value.

Let me explain you precisely my scenario

I have a Record 1 in Table A. In the Detailed view of Record 1, I want a button which would open the form to add Record 2 in the same Table A but the value of the ID Field of the record 1 should be copied and prepopulated as value of one field in Record 2 .

Its nothing but simply providing a reference of record 1 in record 2 .

Its easy if I start the form fresh and provide the reference using the drop down but I want this record to be created from the record I am going to refer to.

Do I sound clear ?

Thank you.

Could you elaborate the above? The word โ€œreferenceโ€ has specific meaning in AppSheet and hence the query. Also what problem you are facing when trying to copy it. What are the columns types of the two fields?

Table A has got 4 fields

Field 1 - ID
Field 2 - Text
Field 3 - Number
Field 4 - Ref ( Set to the same table. Referring Other record from the same table )

Now say the record values are as follows

Record 1

Field 1 - FID001
Field 2 - xxx
Field 3 - 111
Field 4 -

Record 2

Field 1 - FID002
Field 2 - xyz
Field 3 - 222
Field 4 - FID001

Hope this clarifies.

I just want a button in RECORD 1 View , that when clicked will open the form for adding new record RECORD 2 and prefill the FIELD 4 of RECORD 2 with the value of the FIELD 1 of RECORD 1

Does that clarify. Simple reference thing which we do. The only difference is we are referring the record from same table and not another table.

Thank you. As requested, could you update what problem you are facing when trying to use the LINKTOFORM() deep link action?

In general, I am able to replicate the desired functionality , even though your requirement is bit unconventional.

Sorry Couldnt revert. Was away.

Thanks Mr.Gurjar for all the help. Its sorted.

LINKTOFORM(
  "Table A_Form",
  "Field 4", [Field 1]
)

Thanks Steve . Will check this today

Works. Thanks Mate once again.

Top Labels in this Space