Skip to main content
Question

How to Add Multiple Users in API_AddRecord

  • September 21, 2021
  • 0 replies
  • 15 views

Hi All,

I've got this in a Formula URL field:

URLRoot() & "db/" & [_DBID_CHILD] & "?act=API_AddRecord&apptoken=xxxxxxxxxxxxxxx123456789&_fid_30_=" & [Record ID#]
& "&_fid_47_=" & ToText([Associate])
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_PARENT] & "?a=dr&rid=" & [Record ID#])

fid 47 is a User List field and there are a couple instances when the child record needs to be created with several users in that field. One of the users will be from the [Associate] field, and the other user will always be the department head, John Smith. What's the syntax to add John Smith along with the [Associate] field?

Thanks,

------------------------------
Daniel Johnson
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • September 21, 2021
Try this - we will use a semicolon delimited list to populate the field.

var text People = List(";",  ToText([Associate]), ToText([Dept Head]));

URLRoot() & "db/" & [_DBID_CHILD] & "?act=API_AddRecord&apptoken=xxxxxxxxxxxxxxx123456789&_fid_30_=" & [Record ID#]
& "&_fid_47_=" & URLEncode($People)
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_PARENT] & "?a=dr&rid=" & [Record ID#])

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------