Can you have a button in a table to create a new record in a none related table

  • 0
  • 2
  • Question
  • Updated 2 years ago
  • Answered
I have 2 table that are not related.  Can I create a button in Table 1 to add a record in Table 2?
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 2
Photo of Matthew Neil

Matthew Neil

  • 31,478 Points 20k badge 2x thumb
Yes

Do you want it to create the record without even going there?  or do you want to go to the new table and a new form to confirm info and save?
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb
Go to the new table form
Photo of Matthew Neil

Matthew Neil

  • 31,478 Points 20k badge 2x thumb
Make a formula url field.

Use something similar to this (your variables will change)

URLRoot() & "db/" & [_DBID_TABLE_2] & "?a=API_GenAddRecordForm&_fid_11=" & URLEncode ([Field I want to Pre fill])& "&_fid_8=" & URLEncode ([another field I wand to pre fill])& "&z=" & Rurl()

If you don't want the redirect back to the origin, remove the & "&z=" & Rurl()
at the end.

If you have more info of what you are trying to have it right, and some fields that need to be written to, let me know and I can help with syntax if needed.