I learn something new Thanks
From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Mueller, Doug Sent: Wednesday, August 31, 2016 2:49 PM To: arslist@ARSLIST.ORG Subject: Re: Application-Query-Delete-Entry ** Fred, The key is to not have the keyword interpreted as you prepare the command line to be run. As entered by Dave, there were no “” around the keyword – as there should not be to work as a keyword. But, as it was just the keyword, it was being expanded as the run process was being created rather than staying as a keyword to be processed in the qualifier as the command ran. It would expand into the timestamp value. Without quotes, you get one error – a syntax error. With quotes you get another syntax error of a character string being subtracted by a number (or if it auto converts, likely you get the month as an integer and that is involved in the arithmetic operation). The key is to keep it from expanding as the command line is being built so that it is a true keyword when the command is run and it is passed on to the process. Doug From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Grooms, Frederick W Sent: Wednesday, August 31, 2016 12:28 PM To: arslist@ARSLIST.ORG<mailto:arslist@ARSLIST.ORG> Subject: Re: Application-Query-Delete-Entry ** Would using the Slash (and no Double Quotes) make the keyword be treated as the number value in the Run Process? '3' < (1472670600 - (86400 * 75)) I was thinking he was getting the qualification error when the Active Link fires because of the expansion and no double quotes '3' < ($TIMESTAMP$ - (86400 * 75)) Expands to something (assuming US format) which the Run Process command wouldn’t understand '3' < (08/31/2016 2:10:00 PM - (86400 * 75)) (8 divided by 31 divided by 2016 then error as it doesn’t know what to do with the 2 ) With Double Quotes around the keyword ( “$TIMESTAMP$” ) it would expand to '3' < (“08/31/2016 2:10:00 PM” - (86400 * 75)) Fred From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Mueller, Doug Sent: Wednesday, August 31, 2016 2:01 PM To: arslist@ARSLIST.ORG<mailto:arslist@ARSLIST.ORG> Subject: Re: Application-Query-Delete-Entry ** Dave, All the other suggestions about archive and escalations and the like apply as different ways to get this done. But, to tell you why what you were doing below doesn’t work and to help any other users having issues with qualifiers in run processes. Use $\TIMESTAMP$ instead of $TIMESTAMP$ in the qualifier. The extra \ is to escape interpretation of the value. As entered, the TIMESTAMP keyword is expanded as it is processing rather than being a keyword so you get the syntax error. Putting in the \ will keep it a keyword and your qualifier should do what you wanted. This syntax is needed only for situations where you are putting a qualifier inside the logic of an operation (not in the RunIF but in places where normally the keyword is expanded during as the operation proceeds). (and I think it is a \. If not, try /…..) NOTE: Still using the archive or escalation or other mechanism may be the best answer for your specific situation. I just wanted to explain the reason that you were having the issue with the qualifier below. Doug Mueller From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Dave Barber Sent: Tuesday, August 30, 2016 6:49 AM To: arslist@ARSLIST.ORG<mailto:arslist@ARSLIST.ORG> Subject: Application-Query-Delete-Entry ** All, I'm trying to figure out the syntax required for Application-Query-Delete-Entry .... (Server is running ARS 7.5) Trying to keep an "archive" of emails - we have a requirement to keep 6 months worth in the system (audit trail, proof of sending, etc.), and the form was actually turning out to be the largest on the system (over 7 million records - I manually deleted the older ones via the user tool, that is not fun!). In an active link, just trying a simple $PROCESS$ @@:Application-Query-Delete-Entry "AR System Email Messages" '3' < ($TIMESTAMP$ - (86400 * 75)) The 75 is related to a test system and the data that is on it (would obviously be changed on live). The query itself is fine against the email messages form, it just comes up with a qualification error when run via the active link. Any suggestions? I could try an alternative using Application-Delete-Entry <form> <record ID> and table walking, but that'll be horrendously inefficient in comparison to Application-Query-Delete-Entry. Regards Dave Barber _ARSlist: "Where the Answers Are" and have been for 20 years_ _ARSlist: "Where the Answers Are" and have been for 20 years_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years"