Forum Discussion

ShontaySmith's avatar
ShontaySmith
Qrew Assistant Captain
8 years ago

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

I have 2 table that are not related.  Can I create a button in Table 1 to add a record in Table 2?
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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?
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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.