Question

Sorting text data inside a "group by" from AttributeCombiner, Emailer formating option

  • 11 April 2018
  • 4 replies
  • 10 views

Badge

Hello !

I have a workflow that ends with a writer in txt format and an Emailer that should send the same text. An exemple of the txt file from the writer is attached. This are names of administrative areas, grouped by an attribute (set in an AttributeCombiner parameters) so in this exemple there are two "blocks" of text.

Is it possible to sort by alphabetical order the text inside each group ? I can't figure it out since the text is already combine with the AttributeCombiner...

I also need to send an email with the same text message. I tried the Emailer transformer but it sends an email for each group/block of text, so 2 emails here. I would need just one. Moreover, the text formating is lost in the email received (i.e. each administrative area in a separate line)... I tried to connect the Emailer to a FeatureWriter (in txt format) instead of the AttributeCombiner but I can't find how to Edit Value in the FeatureWriter... and the Emailer doesn't seems to provide carriage return or newline option in the text editor...

Any help would be greatly appreciated !

Thanks


4 replies

Userlevel 4

I believe the features inside each group are treated in the order they are received, so you could try using a Sorter before the transformer with the Group By-setting.

If you only need to send a single mail regardless of the number of incoming features, try using a Sampler set to "first 1" feature.

If you need to format the email contents I would suggest sending the mail as HTML rather than plain text.

Badge

Thank you very much David, I'm about to try it

Badge

Has anyone found a solution for this? I have the same issue, only difference is my Attributes to Combine are numbers. I sorted by the group_by attributes and by the Attributes to combine beforehand with sorter, but it still doesnt concatenate them in the right acsending order.. @david_r @jeremielemarcha

Userlevel 1
Badge +11

Has anyone found a solution for this? I have the same issue, only difference is my Attributes to Combine are numbers. I sorted by the group_by attributes and by the Attributes to combine beforehand with sorter, but it still doesnt concatenate them in the right acsending order.. @david_r @jeremielemarcha

Hi @rolfschneider,

 

 

At the moment, I'm not too clear what kind of result you are getting and what your desired result might look like. Since this original question was from some time ago, it might be a good idea to post a new question describing your specific issue with any screenshots, workspace, and sample data. This will help the community understand the issue better and generate more ideas for you, if you're still seeking an answer to this? Thanks!

 

 

- Jovita

Reply