Expand all | Collapse all

API_AddRecord ""Formula Syntax Error

  • 1.  API_AddRecord ""Formula Syntax Error

    Posted 04-06-2017 14:39
    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#];

    & "&rdr=" & URLEncode($DisplayRecord)

  • 2.  RE: API_AddRecord ""Formula Syntax Error

    Posted 04-06-2017 14:56
    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

  • 3.  RE: API_AddRecord ""Formula Syntax Error

    Posted 04-06-2017 15:06
    Pretty soon you can just have your robot respond to all Forum formula syntax question as still be top of the leader board.

  • 4.  RE: API_AddRecord ""Formula Syntax Error

    Posted 04-06-2017 15:10
    Awesome! That was it. I would've never have figured it out. Thanks!