Forum Discussion

MannyCruz's avatar
MannyCruz
Qrew Assistant Captain
8 years ago

Can I have a button exist that would link a record to a different form (same table) and auto populate any shared fields?

Can I have a button exist that would link a record to a different form (same table) and auto populate any shared fields? I am trying to avoid using two tables when I can manage all records in one table
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    This is possible, but you have to have the data set up the right way.

    Can you describe your data a little more?  Is the app already set up, or are you just building now?  What are the reasons for keeping things on the same table?
  • You can have an alternate form, and have buttons to either display using the alternate form or to edit on that alternate form.

    But I really advise against this as when you view or edit a record using the normal methods, you are likely to end up on the wring form and then have to use the button to switch forms.  

    Its far more convenient to have the common fields on the form in a section or sections, and then use form rules to show or hide sections of the form which have unique fields for that situation.

    But against my better judgement here are examples of the button. note that you can mitigate the impact of multiple form but setting the forms usage to specify a form either based on the report or the Role.  You will see the Forms usage menu  in the forms settings once you have more than 1 form.

    URLRoot() & "db/" &Dbid() & "?a=dr&dfid=11&rid=" & [Record ID#]
    URLRoot() & "db/" &Dbid() & "?a=er&dfid=11&rid=" & [Record ID#]

    In this case the ID of the alternate form is 11.
  • MannyCruz's avatar
    MannyCruz
    Qrew Assistant Captain
    Thanks, both of you guys! You guys are both always a great help. I decided to stick with the two tables and keep it neat that way, but I am still going to use a variation of this formula!