Using the User() function in t a Formula-URL field

  • 0
  • 1
  • Question
  • Updated 5 years ago
  • Answered

I am having trouble using the User() function in a Formula-Url field. This is a button that, when clicked, it's supposed to update a record with certain values. The formula looks like this:

URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & & "&_fid_61=Complete"
& "&_fid_96=" &User()
& "&_fid_64=" &Now()

...

The button works as expected, except that the user field (fid_96) does not get updated with the current user. Everything else does.

Am I not using this function correctly? Is there another way to have this field updated with the current username when the button is clicked?

Thanks in advance.

Photo of Juan

Juan

  • 74 Points

Posted 6 years ago

  • 0
  • 1
Photo of Mark_Shnier

Mark_Shnier

  • 700 Points 500 badge 2x thumb
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_61=Complete"
& "&_fid_96=" & totext(User())
& "&_fid_64=" &Now()

You just need to wrap the User() with ToText
Photo of Joseph

Joseph

  • 0 Points
What worked for me was passing the User() function as an email as follows:

"&_fid_96=" & UserToEmail(User())