Forum Discussion

manoharvankired's avatar
manoharvankired
Qrew Trainee
2 years ago

I am receiving an error when attempting to use a formula without saving the record in the 'In Progress' table (B). However, once I save the record in the 'In Progress' table (B), the same formula works fine.

I have two tables. I added a new record to the 'New Request' table (A) using the Quickbase auto-generate API button, and then attempted to add the same record to the 'In Progress' table (B) by clicking on the API button. However, I received an error message stating that the 'rid' parameter was missing.
In Progress' table (B) formula= "If(IsNull([Start Date]),
URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_EditRecord&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np&rid=" & [Record ID#] & "&_fid_45=" & URLEncode("Task Started") & "&_fid_6=" & Now() & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=dr&rid=" & [Record ID#]) )"

Note: I am receiving an error when attempting to use a formula without saving the record in the 'In Progress' table (B). However, once I save the record in the 'In Progress' table (B), the same formula works fine.



------------------------------
manohar vankireddy
------------------------------
  • The record ID# field isn't set until the record has been saved for the first time.  When you're on an "add record" form, [Record ID#] will return a blank value in formulas.  That's why the rid parameter is missing when you use the button from the add form, but it works fine once you've saved it.

    There is a workaround for this, at least for rich text formulas, which is to set the data-replaceRid attribute to true and use %%rid%% in place of [Record ID#]: Formula - rich text field properties – Quickbase Help

    I've never tried using %%rid%% with a formula URL field, so I'm not sure if it works there too.  But it's easy enough to convert your URL field to a rich text field if necessary.  Also something to keep in mind is that I believe the %%rid%% needs to be outside of the URLEncode() function to work properly.



    ------------------------------
    Tyler Jablonski
    ------------------------------
    • manoharvankired's avatar
      manoharvankired
      Qrew Trainee

      I have to use URL button for the outcome. Is there any other way to fix this one 



      ------------------------------
      manohar vankireddy
      ------------------------------