URL to replace field with null value

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Trying to write a URL formula/button that will replace a logged field with a null value (in my case, essentially wiping out the "approval status" logged in the field). Here's what I have, but it's not working... help!



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

var text URLTWO = URLRoot() & "db/" & Dbid () & "?a=td";



$URLONE

& "&rdr=" & URLEncode($URLTWO)
Photo of Ryan

Ryan

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
Just get rid of the  "& null;" part:

var text URLONE = URLRoot() & "db/" & Dbid () & "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_6=";
Photo of Ryan

Ryan

  • 0 Points
Tried, that, however it doesn't update the field at all--the old value remains.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
I entered a similar URL directly in the address bar to confirm "_fid_6=" would blank out the fid=6. Temporarily convert your formula to return a string, return URLONE and paste the result directly into the address bar to confirm. You refer to this field as a "logged field" what does that mean to you? If you are referring to a text field with the option "Log the edits to this field, and show them on forms" you will not be able to blank out a previously logged field value.
Photo of Ryan

Ryan

  • 0 Points
That indeed is my understanding of a logged field. And I was afraid that was what the "issue" is. I was hoping that a null value could still be registered as an entry; i'll simply use a space character. Thanks!