Forum Discussion

PabloDarna's avatar
PabloDarna
Qrew Trainee
8 years ago

Hi, I need button that oppens directly one form to add a record

I have an app with a table "Contracts". Contracts have different types "Services", "Supply", etc. Most of the fields are shared, but depending on the type a set of different fields are used. I cannot use the same form as the dynamic rules have limitations. Therefore I created different forms. I would like to use the dashboard buttons to call the corresponding form to add records in the table, one button for each type: "New Services Contract", "New Supply Contract".  I would like also the button to modify automatically the field "Contract Type" to the corresponding type. 
  • Try this formula;


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

    & "&nexturl=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&dfid=1&rid=" & ToText([Record ID#]))


    This will edit using form ID #1 and then redisplay after Save on that same form. You need a bottom for each form and they need to press the right bottom

    You can also set up a new numeric field like "form number depending of the user " related to the user and use it in the formula , in this way it pops automatically one different form for each user.


     Do you want to leave them in Edit mode after saving?  if so, then in that last line of code, change the "dr" (Display Record) to "er" (Edit Record).


    I hope it helps.