I think I already know the answer to this question but thought I'd ask anyways.
Is it possible that a checkbox can be ticked when you are viewing a record?
We use a checkbox called Closed when a PO has been fulfilled, which then reporting uses to "drop" the order from the list. To tick the box, you have to edit the record, tick the box, and save.
Is it possible to be able to simply tick the box directly when viewing the record, or must I take the steps above?
Its nothing big, just a matter of a few clicks, but certainly would add a little bit of value to the app to add speed wherever we can!
Try this code in a formula URL field. First check with the field ID for the checkbox field. You can see that on the usage tab of the field properties or else turn on Field ID's when viewing your field list. Let's say the field ID is 10.
var text URL = urlroot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & totext([Record ID#]) & "&_fid_10=1";
The URL is just saying to edit the record and change fid 10 to be true ( ie 1).
var bool checkedstate = (If([MyCheckBox], true, true)) ;
& [Record ID#]
& URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])
Also, if you have a lot of checkboxes that need to be set at once, you can do that with the same statement; just add a "var bool" to detect the state of each checkbox field, then add clauses to the API_EditRecord URL that you're creating in the formula. So for example, after
you could add
(supposing that the next checkbox has a fid of 7 and the boolean that detects its state is called checkedstate2)