Jump to content
Server Maintenance This Week. ×

Using DISTINCT in FileMaker 4.1


mikeqro

This topic is 8580 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I guess this is a silly question but I didn't

find it in this FAQ.

I'm performing a -Find action to the database and in the response web page I'm

using the tags : [FMP-Record] to display

the set of records found, now, how can I

display only one time records which have

the same value for some specific field. That's simple using SQL, its' something like : SELECT name DISTINCT FROM table_name. I'd really appreciate your help.

ML

Link to comment
Share on other sites

There is no comparable command in FMP to do that. You'd have to write a script, then call the script through Web Companion with the -Script tag.

I guess that if I sat here and thought about the problem I could probably come up with a method that used a self-join relationship...

Link to comment
Share on other sites

  • Newbies

I solved the problem using a simple javascript function, thanks a lot anyway,

here is the code to avoid displaying multiple

records with the same value on a specific field:

<script language='JavaScript'>

thisField="[FMP-Field:fieldName]";

document.write(thisField);

</script>

<br>

[FMP-Record]

<script language='JavaScript'>

if (thisField != "[FMP-Field:fieldName]")

{

thisField="[FMP-Field:fieldName]"

document.write(thisField);

}

</script>

[/FMP-Record]

Hope it may be useful to someone.

Link to comment
Share on other sites

This topic is 8580 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.