gwmcmanusgwmcma
8 years agoQrew Trainee
Want a link / button to download a file after creating log using API_AddRecord
I am struggling with the code to create a link that allows a user to download a file attachment, but at the same time creates a log to identify the user and the time of download.
The code I have is below and it successfully creates the log record, but does not download the file.
If ([Original File]>"", "<a href=\"" &URLRoot() & "db/" & [_DBID_ACCESS_LOGS] & "?act=API_AddRecord" & "&_fid_6=" & ToText([Record ID#]) & "&ticket=auth_ticket" & "apptoken=app_token" & "up/" & "db/" & Dbid() & "/a/r" & [Record ID#]& "/e7/v0\"target=_blank\">" & [Original File]& "</a>" ,"")
Any help in identifying where I am going wrong would be appreciated.
The code I have is below and it successfully creates the log record, but does not download the file.
If ([Original File]>"", "<a href=\"" &URLRoot() & "db/" & [_DBID_ACCESS_LOGS] & "?act=API_AddRecord" & "&_fid_6=" & ToText([Record ID#]) & "&ticket=auth_ticket" & "apptoken=app_token" & "up/" & "db/" & Dbid() & "/a/r" & [Record ID#]& "/e7/v0\"target=_blank\">" & [Original File]& "</a>" ,"")
Any help in identifying where I am going wrong would be appreciated.