Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only one line being sent when multiple return in query 2

Status
Not open for further replies.

milldataanalyst

Programmer
Feb 6, 2013
3
0
0
US
Hello -

We are having an issue with an event that was created by someone that has left the company. All the IT people on my team are new to Exact Event Manager (< 1 year) and we do not know all the ins and outs of it.

So, my problem is this. I have an event that is set up to break on the customer number and send an email to the email address field. The SQL statement returns multiple rows per customer number but only one of the lines is being sent in the email.

I have checked the following:
[li]The query results return more than one row for the customer I am testing with. Note that the person that developed the query used the different tabs to develop the query and did not write the SQL themselves. With the events I have developed, I tend to write the SQL myself and mine are working. I doubt that it matters, but I thought I would mention it.[/li]
[li]On the email tab, the message text has the Begin Repeat and End Repeat tags. I even took an event that was working and checked to see if there was some difference the the way the tags were handled and I didn't see any. So, it looks like the tags are correct.[/li]
[li]On the Subscribers tab and Advanced sub-tab, the Message Break Field is set to the cus_no (now no distribution method is checked to the right but on some other events I see the same thing and they work).[/li]
[li]On the Subscribers tab and Advanced sub-tab, the Contains Email Address to send to value is set to the email_addr.[/li]

Does anyone have any ideas what we are doing wrong? If more information is needed, please let me know what you need to know.

Thank you.

Tammy
 
Ooops. I just realized this is a Macola forum and not an Exact Event Manager forum. So, please let me know if there is not expertise on Exact Event Manager here.
 
Hello Tammy,

I would recommend that you take a look at the query that is defined for the event. If the event is set to not repeat, then it will go back to the query to look at the field which is marked as "Unique" to determine if the record is a duplicate or not. The field that is marked as a the "Unqiue" field should be unique for each record. In this case, you will probably have a key field plus a key from your customer/contact record. For example: if the query is selecting invoices and needs to send one one per each customer contact, then the unique should be a combination of the Invoice_No + Contact Name or ID. If you have further questions, I will be glad to help you out.
Thanks,

Tori
 
Thank you Tori. I actually finally figured that out. I had just forgot I had that post. It took me awhile to figure it out. I am learning a lot about Event Manager with some of the issues I am encountering. Thank you. That was the problem. The unique key should have been on two fields (the order number and the line number) and it was only one one field (the order number).
 
If you're setting up an event to not repeat - avoid basing the Unique identifier on an ID field. If the table in question is ever altered or rewritten (as part of an update for example) then new values are assigned to the ID field and everything will retrigger...

Peter Shirley
Macola Consultant, PA and surrounding states.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top