Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FileMaker Topics / July 2008

Tip: Looking for answers? Try searching our database.

Distinct records - FM 8

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Deepti - 30 Jul 2008 18:40 GMT
Hi,

I work with FM 8 and would like to know if there is an equivalent of
mysql "select distinct name from tablename order by field2" in FM 8. I
would want to create a php drop down of distinct names and have no
clue how to do it!

Help!
Thank you.
Deepti
d-42 - 30 Jul 2008 20:56 GMT
> Hi,
>
[quoted text clipped - 6 lines]
> Thank you.
> Deepti

Actually if you define a value list using a fields contents as its
source, it automatically uses 'select distinct' semantics.

You can use that value list directly on layouts etc, or access its
contents via the ValueListItems(...) function.

-regards,
Dave
Deepti - 30 Jul 2008 21:55 GMT
Hi Dave,

Thanks a ton! Can we do this similar to select distinct name from
tablename where salary=10000 order by name???
I realised my distinct list is 10,000 names and its too long a drop
down for the user to choose from in the form.
I really appreciate all your help.

Thanks a ton!
Deepti

> > Hi,
>
[quoted text clipped - 15 lines]
> -regards,
> Dave
d-42 - 31 Jul 2008 11:22 GMT
> Hi Dave,
>
[quoted text clipped - 6 lines]
> Thanks a ton!
> Deepti

Absolutely. For that you would have to define the valuelist based on a
relationship, which would have its criteria as salaryfield =
criteriafield (for example), and you can set that it be sorted as
well. (either defining the relationship to be sorted, or by defining
the value list to be sorted -- I think either should work, but would
recomend making the value list sorted not the relationship -- that
will ensure the smaller "distinct' set is sorted, rather than the full
set including duplicates.)

Play around with defining value lists, and read up on them in the
help, to give you sense of what you can accomplish. There are quite a
few options available.

cheers,
Dave
Deepti - 31 Jul 2008 20:36 GMT
Hi Dave,

Thank you for your detailed reply. The problem here is that I need to
display this distinct list as a drop down on form using fx php (which
is tool to use filemaker on the web). So, being able to display the
distinct data is becoming a problem.

Thanks!
Deepti

> > Hi Dave,
>
[quoted text clipped - 22 lines]
> cheers,
> Dave
d-42 - 31 Jul 2008 21:31 GMT
> Hi Dave,
>
[quoted text clipped - 5 lines]
> Thanks!
> Deepti

Once you have it displaying in a value list, its a trivial matter to
capture the list items using the valuelistitems() function, and use it
however you want, including fx php.

Cheers,
Dave
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.