Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
until now I could always get the last record by using peek(...,-1) or previous(). But now I need the last record where my field 'EbeneID' is the same. So I load data like this (just ignore the text is always the same, just for showing issues):
ID | EbeneID | Text |
---|---|---|
1 | 1 | some Text |
2 | 2 | some Text |
3 | 3 | some Text |
4 | 2 | some Text |
5 | 1 | some Text |
6 | 2 | some Text |
7 | 3 | some Text |
8 | 1 | some Text |
Now I want to get the text of the previous record with the same EbeneID without order the table by EbeneID (in real the table is much bigger, and it is not really an ID, its all about HTML-Code, so it is not possible to order the table and get the right text each!)
I need something like:
previous(text where previous(EbeneID) = EbeneID) , sure this doesn't work
Thanks in advance!
That gives the solution to his output table as given, but unfortunately the actual required output is the table in my subsequent post.
Good point about script vs UI though - richters, does the solution need to be based on user-selections?
No,
this has to be in the loading script because this is just the basis of further work in the script.
Oh in that case it's really easy, just use FirstSortedValue combined with a filter (with If clause) to get the max-ID-with-same-EbeneID-but-inferior-to-current-ID
Here it is
Nice
Well done, thank you. I have to look at it in detail later on. Thanks!