here is my code:
newSystem.setAttribute("where","[MIN_DCP].id = '"+this.getProperty("id")+"'");
I'm looking to add the OR condition to it.
where min_dcp.id = this.getProperty("id") OR min_dcp_parent_adp = this.getProperty("id")
There's a few different ways to go about doing an OR condition like this.
First off, where clauses do allow you to use OR conditions by simply throwing an OR between the two conditions. When working with OR clauses, I'd recommend taking a look at standard SQL syntax. There are some measures in place to avoid SQL injection so not all the standard SQL syntax is supported, but use of AND and OR seem to be fine from my tests.
Secondly, since you're querying on IDs, you can take advantage of the idlist attribute instead of the where attribute. This allows you to pass in a comma separated list of IDs to filter your query by.
Lastly, I'd recommend checking out the Programmer's Guide for some additional ways to do logical queries like this. The other ways are not suited for IDs since there are easier approaches, but I want to mention them in case you have similar requirements for other properties in the future like if you want to search for an item with one of two keyed_name's.
Aras Labs Software Engineer