Formula does not work...

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered
I am trying to have a button that reassign a "parent" record from a "child" record.
The child record has in field 8 the related record field (ie record of the "parent"), and in field [New Record Id] the new "parent" Id that I want the child to have.

So I wrote this formula and nothing seems to happen, whether in read mode or in edit mode.

Has anyone any hint ?


URLRoot()& "db/" &Dbid() &"?a=er&rid="&[Record ID#]&"&_fid8="&[New Record Id]
Photo of Patrice

Patrice

  • 10 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
no problem,

You have your heart in the right place, but lots of issues with the formula.  First of all you need to use the API format.  You get the help for API's  by looking under HELP for API and limiting the results to the "On Line" help.

If you want to make a button to edit a field and the refresh the record, you will need to chain two actions together.  I will use formula variable to make he formula more readable and easier to debug.  here si some help text on formula variables if you have not used them before. http://www.quickbase.com/user-assistance/Default.html#formula_variables.html

var text URLONE = URLRoot() & "db/" &Dbid() &"?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_8=" & [New Record Id];

var text URLTWO = URLRoot()& "db/" &Dbid() &"?a=dr&rid=" & [Record ID#];

$URLONE
& "&rdr=" & URLEncode($URLTWO)

I put an app in the Exchange which gives examples of how to make URL formula button.  Search under Dummies or URL Formuals for Dummies to find it.
Photo of Patrice

Patrice

  • 10 Points
Thanks. It does help !