Getting Express entity values

Permalink 1 user found helpful
I must have missed something basic somewhere as I can get lists of Entities and read their values fine but I'm expecting
$a = Express::getEntry(13)

to let me do
$a->getForename() // the handle is 'forename'

and $a then equal 'Helen'

If I goto /index.php/dashboard/express/entries/view_entry/13 then it certainly shows me an entity with a forename of Helen but that code yields a null. Ultimately this is supposed to retrieve a page attribute which is an express entity which has been selected as the Helen record in this instance, I reduced it to a get by id to test why it didn't work.

What did I miss?

View Replies: View Best Answer
hutman replied on at Permalink Best Answer Reply
$a->getForename() // the handle is 'forename'

won't make $a equal to the value, it will just output the value so
echo $a->getForename() // the handle is 'forename'

should echo 'Helen' in your case.
surefyre replied on at Permalink Reply
Sorry I was being a pillock. I looked to find this thread to remove it but couldn't see it under 'my posts' ...

All solved now :) thanks