[FX.php List] Accessing a dynamic value list?

Erik Andreas Cayré erik at cayre.dk
Sat Aug 19 15:24:48 MDT 2006


Den 19/08/2006 kl. 18.11 skrev Bob Patin:

> I have a value list that changes depending on which record someone  
> views (a dynamic value list).

So the value list is based on a relation, right?
Exactly how is the value list defined? (screen dump of dialog?)

> Is there a way to access it in FX and use it on a PHP page? I've  
> tried everything that I can think of, but nothing has worked thus far.

As of FX.php 4.2, it seems you can only get at value lists using  
FMView(), so it's a separate call to FX, just to get the value list.
I just tested it and noticed FX only return the primary field from  
the value list, so it can't be used like in FM, where values from a  
second field can be shown with the primary field data.

> To complicate the question more, how would I tell FileMaker *which*  
> version of the value list I would like to see?

You could have a relation starting from a global field, and the value  
list being based on that relation:
-Set the global with SetFMGlobal()
-get the value list with FMView()

> In this app, it works like this:
>
> If I pull up "Toyota" in the first pulldown and click CONTINUE, I  
> go to a 2nd page.
> On the 2nd page, I want to see a pulldown menu containing all  
> Toyota models.
>
> Before you suggest a simple FIND to find all the records that  
> contain Toyota models, here's the rub: there are as many as 17 or  
> 18 records for a single Toyota model, so if I do a FIND for all  
> records that contain TOYOTA as the brand, I'll find not a dozen  
> Toyota models, I'll find over a hundred, and my value list will  
> have duplicate entries in it.
>
> Any ideas? I'm sure this has been faced before, but couldn't find  
> it in my archives.

If you do the FIND as described, you could use array_unique() to  
strip the duplicates.
This may not be feasible, if some finds return too many records  
leading to mediocre performance...

Let us know how you get on with it...

---
Erik Andreas Cayré
Spangsbjerg Møllevej 169
DK-6705 Esbjerg Ø

Home Tel: +45 75150512
Mobile: +45 40161183

»If you can't explain it simply, you don't understand it well enough.«
-- Albert Einstein

»If you don't have time to do it right, when will you have time to do  
it over?«
-- John Wooden, basketball coach


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1856 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20060819/1c05ed82/smime.bin


More information about the FX.php_List mailing list