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

Hi Jason,

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!
nmsinc

Re: [nmsinc] Adding list of records to �User� section

By Jason - September 20, 2011

Hi,

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: [nmsinc] Adding list of records to �User� section

By nmsinc - September 20, 2011

Hi Jason,

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!
nmsinc

Re: [nmsinc] Adding list of records to �User� section

By Jason - September 21, 2011

Hi,

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/