Skip to main content
Question

How do I create several buttons that each open different parts of the same form?

  • June 19, 2018
  • 0 replies
  • 43 views

I have one form that contains lots of fields from various tables.  I want to be able to have 4 buttons (New Show, New Rental, New Community Event, New Film) that will each open certain fields depending on the button.  Much of the info needed for each type is the same so I didn't want to create different forms for each.  Thanks.
This topic has been closed for replies.

I agree with having 1 form and using form rules.

In View mode you can use an API to check certain fields and then refresh the record.


var text URL = URLRoot() & "db/" & dbid() & "?act=API_EditRecord"
& "&_fid_100=0" // uncheck field ID 100
& "&_fid_101=1"; // check field ID 101


"javascript:" &
"$.get('" & 
$URL & 
"',function(){" &
"location.reload(true);" &
"});" 
& "void(0);"

So the first part defines a formula variable called URL to edit some fields on the record, and then that javascript stuff simply run the URL and refreshes the page.  Don't worry that you do not understand the javascript stuff.  Almost "nobody does"  It just works.

The trick is to always call you formula variable URL and then use URL in the middle line in the javascript.

here is some help on formula variables if you have never used them

https://help.quickbase.com/user-assistance/formula_variables.html

  • Registered
  • June 19, 2018
>Don't worry that you do not understand the javascript stuff.  Almost "nobody does"  It just works.

I am launching a new program called Know Codeβ„’ as a remedial measure.