Solved

How to return unique values from XML Custom Web Publishing...???

Posted on 2006-10-23
6
242 Views
Last Modified: 2010-04-27
I'm using the following call to return email addresses from our database based on buyers of a certain product in our database:

https://server.com/fmi/xml/fmresultset.xml?-db=Invoices&-lay=waGetEmails&-sortfield.1=Leads_Clients::Email_Address&Invoice_Items::Description="&ProductDescription&"&-find

This returns results just fine, however, if the same person bought the same type of item more than once their email is getting returned multiple times.

How can I filter this so that it only returns unique values?  Basically, I  need the equivalent of a SQL SELECT DISTINCT statement.

Any information would be greatly appreciated.  thanks!
0
Comment
Question by:Andrew Angell
  • 2
  • 2
6 Comments
 
LVL 28

Expert Comment

by:lesouef
ID: 17792896
you should issue the query to the customers table, not the invoices. this assumes you have a link in between the customers and the invoice_items table, which you may not have
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 17793061
I don't see what that would help...???  The criteria I'm searching on is in Invoice_Items.  The data that I'm actually returning is in Leads_Clients (customers).  These are related based on an invoice.  Invoices::ID relates to Invoice_Items::ID and Leads_Clients::ID relates to Invoices::CustomerID.  That's the whole point of a relational database, isn't it?  If I have to keep creating relationships everything then I'm confused.

Also, would that even help my problem?  If just select from the Invoice_Items with a relationship between the 2, say Leads_Clients::CustomerID and Invoice_Items::CustomerID, I'd still get an email address back for every item in Invoice_Items where there was a match.  Which would still be multiple.

You've kinda gotten me all twisted here.  I'm a little lost.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 17795196
I was just trying to find a way to get a single record as the result, and I only see the client table to do this. Ignore my idea if it confuses you. I am always thinking what I would do with a regular FM client, I am not using theses web things as it makes everything more difficult.
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 17800328
I got it to work by creating a recordset and adding each email to it within the parsing loop.  Then I can use sorting and only print emails that aren't equal to each other.  
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18023850
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now