Troubleshooting duplicated fields in email template

What’s the best way to troubleshoot duplicated fields in the email template?

image

I’ve tried every combination of Select Table Fields I can think of - it either shows nothing at all (Updated Records, Added, or Deleted checked), or doubles it (Unchanged Records). I figure if anything, Unchanged records would give me one…

image

image

image

I cant remember, but is it possible to set that Fill by Query to distinct?

Are you using a Field query or a Table query? for that inserted field?

What does the Customer query look like? Any chance its getting multiple records?

@ckrusen - It’s a Field query for the fields.

@Chris_Conn - I did a message to see what’s shown with the fill table, and no duplicates.

When I see multiple values for a field Query, one is usually the current/old value, and the other the new/proposed value.

OR, the value for the deleted record, changed, added, etc…

Since you’re BPM is a Std DD, there should only be one value (the value that was written to the table).

I’ll assume:

  • The CustomerData variable is a dataset you made for this BPM
  • The Fill Table By query is constructed properly, to only fetch the Customer record once. Can you confirm this? Or at least share the Query and mapping.

If those are the only two fileds you need, why not make two variables (for CustID and CustName), and set them using Set Variable widgets. Use Jose’s simple one line expression to fetch data from the Customer DB Simple One Liner to retrieve data from DB.

I gave it a shot, but get an error when I trigger this BPM in Quote Entry. At least it’s clear that there are 2 rows!

I didn’t understand Jose’s one line expression very well (I’m getting data from the Customer table, and this data directive is on QuoteHed). As Brandon mentioned in that thread - WHOOSH! :slight_smile:

image

image

Here’s my Fill Table by Query:


image
image
image

No need for the Fill Table by query.

Make 2 variables:

image

Use Set Argument/Variable widgets

CustID:
image

CustName:
image

Then insert the Variables into the email body.

image

2 Likes

@ckrusen for the win! Thank you for dumbing it down for me. I’ve save that code snipped into my notes for future use.

I don’t understand why the Fill Table By Query had 2 rows, but I guess I’ll move on.

1 Like