Adding list of records to “User” section
15 posts by 3 authors in: Forums > CMS Builder
Last Post: September 21, 2011 (RSS)
By nmsinc - September 20, 2011
I made an attempt at your suggestion - see page header below:
// load records
list($insurance_companiesRecords, $insurance_companiesMetaData) = getRecords(array(
'tableName' => 'insurance_companies',
'loadUploads' => '0',
));
list($adjuster_namesRecords, $adjuster_namesMetaData) = getRecords(array(
'tableName' => 'adjuster_names',
'loadUploads' => '0',
));
list($accountsRecords, $accountsMetaData) = getRecords(array(
'tableName' => 'accounts',
'loadUploads' => '0',
));
list($claims_submissionRecords, $claims_submissionMetaData) = getRecords(array(
'tableName' => 'claims_submission',
'where' => "insurance_company_rep = '".intval($CURRENT_USER['insurance_company_rep'])."'", ));
'perPage' => '25',
));
I have four sections that I am loading incuding the "user" (not sure if user section is needed here). I edited the "claims_submission" section as you suggested and received a no load page!
Re: [nmsinc] Adding list of records to �User� section
By Jason - September 20, 2011
I'm assuming it's the claim_submissions section that is returning no records. To see exactly what the query being executed is, try this:
list($claims_submissionRecords, $claims_submissionMetaData) = getRecords(array(
'tableName' => 'claims_submission',
'where' => "insurance_company_rep = '".intval($CURRENT_USER['insurance_company_rep'])."'", ));
'perPage' => '25',
'debugSql' => true,
));
this will output the SQL to the screen. Could you add the output to this thread?
Also, it's important to note that a user needs to be logged in for this to work.
Thanks
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Adding list of records to �User� section
By nmsinc - September 20, 2011
I'm logged in as the user and added the debug line and it still produces a 'null" (empty) page!
The page source code returned looks like this: <![/#0000ff]DOCTYPE[/#800000] [/#0000ff]HTML[/#ff0000] [/#0000ff]PUBLIC[/#ff0000] "-//W3C//DTD HTML 4.0 Transitional//EN">[/#0000ff]
<[/#0000ff]HTML[/#800000]>[/#0000ff]<[/#0000ff]HEAD[/#800000]>[/#0000ff]
<[/#0000ff]META[/#800000] [/#0000ff]content[/#ff0000]="text/html; charset=utf-8" [/#0000ff]http-equiv[/#ff0000]=Content-Type>[/#0000ff]</[/#0000ff]HEAD[/#800000]>[/#0000ff]
<[/#0000ff]BODY[/#800000]>[/#0000ff]</[/#0000ff]BODY[/#800000]>[/#0000ff]</[/#0000ff]HTML[/#800000]>[/#0000ff]
.bm As a note, everything works fine if I remove the "where" tag.
Re: [nmsinc] Adding list of records to �User� section
By nmsinc - September 20, 2011
Never mind - I found my error, guess I'm a little to lazy on one hand and added a double quote when it was not required!
Works just as it should - thanks!
Re: [nmsinc] Adding list of records to �User� section
By Jason - September 21, 2011
Glad to hear everything is working now. Please let us know if you run into any other problems.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/