Hello,
This kind of dynamic parameter isn't yet supported in the standard AML Search, but you could write a custom Server Method that does this kind of replacement. You could then call that Server Method by passing the name into the action of your AML query like
<Item type="Part" action="My Custom Get"/>.
The example code below is a rough demonstration of what this method could look like.
// Change the action to a real get
this.setAction("get");
// Get today's date in the appropriate format
string todaysDate = DateTime.Now.ToString("yyyy-MM-dd");
// Perform a raw string replacement of the @today variable and today's date
string updatedAml = "<AML>" + this.dom.OuterXml.Replace("@today", todaysDate) + "</AML>";
return this.getInnovator().applyAML(updatedAml);
If you'd like to run a search on the current date and time you can instead use a format like:
yyyy-MM-ddTHH:mm:ss
Chris
Christopher Gillis
Aras Labs Software Engineer