Email with Table Records not sending correctly

Email with Table Records not sending correctly

  

Hi, 

In my application I want to send some information by sending an email that has in the main content a Table Records. That table records is being "fed" by one aggregate in the Email Preparation that has some entities. I have data in the entities and, in the test values of the aggregate, the values appearing ARE the expected! But for some reason, when I see the email that has been sent and received, the value that appears in the Table Records is just the first one of that aggregate. For instance, I shop 4 items, and the aggregate in test values shows that 4 desired items, but in the email, it only is shown the first item of the aggregate in the Table. I am not doing any group by. Can't really figure out what is the problem.

Thank you in advance, 

Miguel Marçal

Hello Miguel,

Just a small question.
What is the value defined in the Property "Line Count" of the Table Records in the email screen?

Would it be 1, for instance?

Cheers,
Eduardo Jauch

Eduardo Jauch wrote:

Hello Miguel,

Just a small question.
What is the value defined in the Property "Line Count" of the Table Records in the email screen?

Would it be 1, for instance?

Cheers,
Eduardo Jauch

Hi Eduardo!

The Line Count of the Table Records is 50...

Thank you for the reply! 


Hi,

Did you debug the preparation to see exactly what is being passed as input parameters and session variables, to validate that the values are the same you are using in the test?

Cheers,
Eduardo Jauch

Hello,

Yes I did, the values I am using in the test are the ones that I saw in the debugger. And the values returned by the test are correct. 

The email with only the first record

Hello Miguel,

Was you able to solve this?

If you say the values you are passing are correct, and that the Table/List Records in the email have the default number of lines (50), and I am assuming that you are not limiting the number of records in the Aggregate (Max Records) to 1, than, the other possibility that occours me is that the data is there, but is covered by any other element in the page, like it is inside a div with a defined height and overflow hidden, etc.

Cheers,
Eduardo Jauch

Solution

Hi Eduardo,

After reading your last comment, I once again went to the screen action and review the logic. I had a little logic problem in my For Each. Inside the loop I assigned the created Sale.Id to the Product.SaleId, but sent the email only when the loop ran ONCE. The aggregate in the email preparation had a filter for that SaleId, so, obviously, as it just processed the first element of the Table, it only shown that specific product. I was able to solve this by doing another For Each, going through the Table again AFTER all products had that Product.SaleId and of course is sending the correct information. 

Thank you for all the help!

Best regards,

Miguel Marçal

Solution

Hi Miguel,

Nice to know you solved the problem :)

Cheers,
Eduardo Jauch