Retreiving express entries
Permalink
I have been playing with express a bit more lately and reading what I can find for documentation. I see about building a list:
That's all good, but when I know "John Doe" is the name and all want is his phone number, is there a way to pull just John Doe's record without building a list and having to use a foreach?
Thanks
$entity = Express::getObjectByHandle('employees'); $list = new \Concrete\Core\Express\EntryList($entity); $list->filterByFullName('John Doe'); $results = $list->getResults(); foreach($results as $r){ $telephone= $r->getTelephone(); }
That's all good, but when I know "John Doe" is the name and all want is his phone number, is there a way to pull just John Doe's record without building a list and having to use a foreach?
Thanks