Code Generator > List Page: see only the records created by the user
I've not tried this myself, but the last post on the following forum thread might help.
Looks like basically this might do it:
'where' => mysql_escapef('createdByUserNum = ?', $CURRENT_USER['num']),
Thank you for your reply.
It seems it works.
// load records from 'aortic_aneurysm_disease' list($aortic_aneurysm_diseaseRecords, $aortic_aneurysm_diseaseMetaData) = getRecords(array( 'tableName' => 'aortic_aneurysm_disease', 'perPage' => '10', 'loadUploads' => false, 'allowSearch' => true, 'where' => mysql_escapef('createdByUserNum = ?', $CURRENT_USER['num']), ));
What about a search query to search within the file?
Glad that worked for you, Andreas.
Depending on what you have in mind for search, one of these methods might work.
1) There's a variety of search methods in the CMS Builder documentation here:
2) To search multiple tables on one page, you can try MultiSearch.php referred to in this forum post:
There's a download link to MultiSearch.php at the bottom of the second post.
Hope that helps!
Unfortunately, I have not been able to manage it as I expected. I am thinking of adding some PHP code inside this list-page (already filtered to contain only records created by the logged in user) that will allow users to search within it using various criteria. Is there some code available?
There's some examples here for creating search fields: https://www.interactivetools.com/docs/cmsbuilder/viewer_search.php
What fields do you want to search on and what do you want it to look like?