In testing this morning, I tried to use WHERE Email_ID = '$1$' (trying to use the field ID rather than name). I saved the active link, tested it and it worked. I went back to the active link to find out that it had changed it from the field ID to '$Email ID$'. I think originally I had entered $Email_ID$ unless there was some ARS trickery going on.
-Matt Matthew C. Gayford Technology Research & Development Information Technology Systems Division University of North Carolina Wilmington (910) 962-7177 From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Gayford, Matthew C. Sent: Wednesday, February 20, 2008 6:58 PM To: arslist@ARSLIST.ORG Subject: Re: Direct SQL - Using current request ID ** Just for the purposes of testing, I added a button to the form so I could test with existing records. In the end I want to have it fire on submit. I was able to hard code the entry ID into the direct SQL statement to make it work this afternoon, so I know the statement is good. I just need it to interpret that entry ID somehow. Matthew C. Gayford Technology Research & Development Information Technology Systems Division University of North Carolina Wilmington (910) 962-7177 From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of William Rentfrow Sent: Wednesday, February 20, 2008 5:20 PM To: arslist@ARSLIST.ORG Subject: Re: Direct SQL - Using current request ID ** What is your execute action for your active link? Is this for a new record being submitted into the form? ________________________________ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Gayford, Matthew C. Sent: Wednesday, February 20, 2008 1:58 PM To: arslist@ARSLIST.ORG Subject: Re: Direct SQL - Using current request ID ** I forgot, we're running ARS 7.0.1 patch 003 and MS SQL 2005. Matthew C. Gayford Technology Research & Development Information Technology Systems Division University of North Carolina Wilmington (910) 962-7177 From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Gayford, Matthew C. Sent: Wednesday, February 20, 2008 2:52 PM To: arslist@ARSLIST.ORG Subject: Direct SQL - Using current request ID ** Hi List, I've got a button on the AR System Email Messages form that executes an active link with a direct SQL action. The SQL statement needs to get data from the current request, so I'm basing that on the Email ID field. However, I can't seem to get the where clause to work. Here's what I've tried. Statement: WHERE Email_ID = $Email ID$ Result: ARERR [552] Failure during SQL operation to the database : Incorrect syntax near '='. (SQL Server 102) Statement: WHERE Email_ID = '$Email ID$' Result: No item matches active link conditions - I checked the SQL log and see this WHERE Email_ID = ' ' but if I run a report on the form I'm working on I can see the Email ID field is populated. Statement: WHERE Email_ID = "$Email ID$" Result: *** ERROR *** An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name. TIA, Matt Matthew C. Gayford Technology Research & Development Information Technology Systems Division University of North Carolina Wilmington (910) 962-7177 __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___ __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___ __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___ __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"