3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 24, 2012   (RSS)

Re: [InHouse] .fullname Options in List field

By Jason - July 24, 2012


The createdBy. set of fields are pseudo fields generated by the getRecords() function. What it does is look at the createdByUserNum field value, and attempt to find a record with the same num value in the accounts table. If it does, it adds "fields" into the returned record set like createdBy.fullname

I'm actually pretty suprised the createdByUserNum.fullname wouldn't always return an error, since that index should never be created.

It's important to note that this pseudo field is only created when getRecords() is called. If you retrieve the record by any other means (mysql_select() for example), you won't get these values.

You can also turn off these pseudo fields by using the options:
'loadCreatedBy' => false,

in getRecords().

Currently, getRecords only looks in the accounts table, and not in the website membership table. If that type of functionality is required, we could create a simple custom plugin to get that.

Hope this helps clarify. Please let me know if you have any other questions.

Jason Sauchuk - Project Manager

Hire me! Save time by getting our experts to help with your project.

Re: [Jason] .fullname Options in List field

By InHouse - July 24, 2012

Many thanks Jason. That does clarify a number of items for me.

I have to wonder at the odd instance where this worked on a simple-cart orders table. Most of the time, the .fullname column showed '0' as you'd expect. But in one case at least, a single row held the correct full user name. If you're interested, it was the GSG project.

Best wishes,