Skip to main content
Question

API_AddRecord ""Formula Syntax Error

  • April 6, 2017
  • 0 replies
  • 18 views

This seems so simple, but I just can't figure this out. I've taken code that I found posted on this site to add a child record by clicking a button on the parent record, but I keep getting the following error...

Formula syntax error

Expected a valid expression after the "&"

Need someone to please explain what I'm doing wrong...

var text AddRecord =
URLRoot() & ?db/? & [_DBID_CHILD_xxxx]
& ??act=API_AddRecord &_fid_8=? & URLEncode ([Record ID#])
& ?&_fid_6=? & URLEncode([Serial Number])
& ?&_fid_7=? & URLEncode([Model-Part No]);

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

$AddRecord
& "&rdr=" & URLEncode($DisplayRecord)
This topic has been closed for replies.

  • Registered
  • April 6, 2017
My formula parser found the error in a jiffy.

You have "smart quotes" introduced by Microsoft instead of double quotes.

Also, there is an extra space after API_AddRecord

Dan,
Pretty soon you can just have your robot respond to all Forum formula syntax question as still be top of the leader board.
Mark

Awesome! That was it. I would've never have figured it out. Thanks!