[FX.php List] [OFF] How does the List function work?

Carl Anderson Carl.Anderson at asu.edu
Tue Nov 27 13:36:21 MST 2007


Dan:

As I mentioned, FX isn't going to work for me--there's too much data on the
layout in question, so I'm writing a script that will copy all of the
relevant bits to a "Web" layout.

And thanks, Alex, I actually have a link to that on my toolbar. :)

-- 
Carl Anderson 
Technical Support Analyst
Distance Learning 
Herberger College of the Arts
Arizona State University
http://herbergeronline.asu.edu


> From: DC <dan.cynosure at dbmscan.com>
> Reply-To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Date: Tue, 27 Nov 2007 15:31:47 -0500
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Subject: Re: [FX.php List] [OFF] How does the List function work?
> 
> list() is not what you are looking for.
> 
> you need to understand the FX returned array - it holds all the data you
> need.
> 
> i believe that the FX documentation has info on that.
> 
> FX returns a complicated, nested array for each find request. in PHP,
> you take that array and do whatever you want with it. when you read the
> docs, you'll see that the FX array has a 'data' element that is another
> array that lists all the records keyed by recid and modid. inside each
> of those is another array. just loop over that in a foreach and build
> your list inside the foreach.
> 
> there are many examples of using foreach to loop over the fx returned
> result (in the archives). there was a searchable archive link posted a
> month or two back...
> 
> here is one that should give you the general idea:
> 
> foreach ($fxResult['data'] as $record) {
> echo $record['fieldName'][0].',';
> }
> 
> HTH,
> dan
> 
> Carl Anderson had written:
>> Good day, list:
>> 
>> I'm trying to get the contents of a single field across all records in a
>> layout, and put those values into a list in a single field in a different
>> table.  In other words, the field on all records is "exam1" and I want the
>> "exam1rawscores" field in a separate layout to be something like this:
>> 
>> 10,9,9,5,10,3,1,10,6,7,8,2
>> 
>> Heck, the commas aren't even important--I'd be fine with the carriage
>> returns that (I believe) List() delivers.
>> 
>> Which leads to my question: How can I get List() to do what I want?  Or am I
>> going about this all wrong?
>> 
>> The function reference isn't terribly clear to me, someone who hasn't done
>> much scripting before.
>> 
>> Sorry for the off-topic nature of this.  I'd do all this calculatin' in
>> FX.php, but sadly there's too much data to pull in.
>> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list