Display User Name Rather than Number in Advanced Find

4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 24, 2013   (RSS)

By chrise - April 23, 2013

I am trying set up an advanced find to pull in the User Name. All I have been able to do so far is pull in the CreatedByUserNum description. Can I pull in the created by name without adding the text field to the article?

By chrise - April 24, 2013

Thanks Greg. Could you point me in the direction of where I could find the various built in field names?

Specificaly, now I am still testing advanced find options and Id like to be able to search for a range in a field we call "published_date". Is there a function other than match that I could use for a range rather than a drop down box.

I hope I explained this well.

-Chris

Hi Chris,

You can search a range in a date field by using the min and max variables:

Published Before|published_date|max
Published After|published_date|min

There isn't any documentation on the built in field names as they are dynamically created depending on the fields in your account section. The easiest way to list them is using the getRecords function. If you create a file with the following contents:

  // load viewer library
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('C:/path/to/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

  // load records from 'blog'
  list($blogs, $blogMetaData) = getRecords(array(
    'tableName'   => 'blog',
    'loadUploads' => true,
    'allowSearch' => false,
  ));

  showme($blogs[0]);
  exit;

You'll need to change the table name to the section you want the fields listed from.

When you view it in a browse it will list all of the fields and meta fields available in that section.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com