AML is not working as SQL.
You can apply AML to get data from the DB (and get the DB value of the keyed_name) and then you have 2 options:
- You can pull all Items of type Manufacturer that keyed_name is_null and update the keyed_name value of each Item of type Manufacturer to "1":
Item queryResult = this.getInnovator().applyAML({@yourAML});
Item manufacturersWithEmptyKeyedName = queryResult.getItemsByXPath("//Item[@type='Manufacturer' and keyed_name/@is_null='1']");
for (int i = 0; i < manufacturersWithEmptyKeyedName.getItemCount(); i++) {
string keyed_name = manufacturersWithEmptyKeyedName.getItemByIndex(i).getProperty("keyed_name", "1");
}
- In your code when ever you want to get keyed_name property use getProperty function with 2 parameters, when first one is property name and second one is "default" value of 1. So the idea with this method that if property in DB was null it will return the second parameter (in your case "1")
string keyed_name = someItem.getProperty("keyed_name", "1")