Re: [philb] Undefined index: createdByUserNum......
Great description, that made it really easy for me to reproduce. Thanks. :)
It's a bug. It happens when you don't have a 'createdByUserNum' field. By default the viewers will load in extra fields about the record creator such as createdBy.fullname, createdBy.email, etc.
I've added a fix for this to the next version. Here's how you can apply it now.
- Open /lib/viewer_functions.php
- Make a backup copy of that file.
- Search for "Add createdBy.fields to records" (around line 65)
- add the code in red to the line below it (or just replace the line)
if (@$options['loadCreatedBy']
&& @$schema['createdByUserNum']) { _getRecords_joinTable($rows, $options, 'accounts'); }
Another approach is to just add this line (in red) to your viewer code:
list($ventes_de_lotsRecords, $ventes_de_lotsMetaData) = getRecords(array(
'tableName' => 'ventes_de_lots',
'loadCreatedBy' => false,));
Let me know if either of those fixes it, and thanks for reporting this!
Hope that helps, let me know if you need anything else.
Dave Edis - Senior Developer
interactivetools.com