Monday, January 23, 2012

findRowByIteratorAttribute - Find a row within Iterator with some attribute value

Once we get hold of iterator and when we need to find a row in iterator based on any attribute value, we can use below code

String lName = "Joe";
DCBindingContainer dbc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter = dbc.findIteratorBinding("EmployeesIterator");
RowIterator rIter= iter.findRowsByAttributeValue("LastName", true, lName);
String empId = rIter.first().getAttribute("AcctId").toString();