EricEric3
8 years agoQrew Trainee
Need The Maximum [Record ID#] of a Table
I have a formula that creates a copy of the existing record that a user is currently working on and it works great. I then refresh the screen to present the screen of the newly created record.
var text RefreshRecord=URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Clone Record ID#]
$RefreshRecord
All is good when the user is "cloning" the latest record in the table because I have a formula field in the table that adds 1 to the current [Record #ID]
Essentially ... [Clone Record ID#] = [Record ID#] + 1
However, if the users decides to clone an earlier record in the table, it creates the new record just fine, but the [Clone Record ID#] is wrong because it's not referencing the "new" record, but rather the record right "after" the record the user chose to clone.
So I want to change the field formula to something like [Clone Record ID#] = Max([Record ID#]) but I know it doesn't work that way in QuickBase.
Please advise
var text RefreshRecord=URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Clone Record ID#]
$RefreshRecord
All is good when the user is "cloning" the latest record in the table because I have a formula field in the table that adds 1 to the current [Record #ID]
Essentially ... [Clone Record ID#] = [Record ID#] + 1
However, if the users decides to clone an earlier record in the table, it creates the new record just fine, but the [Clone Record ID#] is wrong because it's not referencing the "new" record, but rather the record right "after" the record the user chose to clone.
So I want to change the field formula to something like [Clone Record ID#] = Max([Record ID#]) but I know it doesn't work that way in QuickBase.
Please advise