# Java Snippet Help

**URL:** <https://forum.knime.com/t/java-snippet-help/48511>\
**Category:** KNIME Analytics Platform\
**Created:** [October 31, 2022, 7:15pm UTC](https://forum.knime.com/t/java-snippet-help/48511 "2022-10-31T19:15:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [November 1, 2022, 12:51am UTC](https://forum.knime.com/t/java-snippet-help/48511/3 "2022-11-01T00:51:41Z")

</div>

Hi @BSFL89 , I must confess that I haven’t quite managed to follow exactly what you are trying to do but that may be because I’m not at my computer at the moment and am just reading this on my mobile.

I wonder if you could give a sample of the output for a given customer as it is hard to visualise just from a long description.

In terms of the Java Snippet, whilst it really has direct access to only a single row of data, it can be made to work ‘cumulatively’ and as it processes each row, it can be made to ‘remember’ information that has been acquired from previous rows which I think is possibly what you are trying to do here.

Maybe give this post a read which gives some examples of this feature of Java snippets and maybe something here can be adapted to what you need, or may give some pointers…

> [@Java snippets have long memories!...](https://forum.knime.com/t/java-snippets-have-long-memories/33125):
>
> Hi all, Before you get reading what is maybe a tl;dr… I should say this isn’t asking a question or raising a problem, but is just a discussion/interest point related to java snippets! wink For some of you, what I am writing here won’t come as a surprise, but I thought it worth writing as it might avoid the mistake I made, and it also can potentially be quite useful. While playing with Java snippets I was surprised to stumble on some interesting behaviour. I had “incorrectly” initialised th…

---

_[View the full topic](https://forum.knime.com/t/java-snippet-help/48511)._
