Forum Stats

  • 3,780,660 Users
  • 2,254,421 Discussions
  • 7,879,408 Comments

Discussions

SetCurrentRowWithKey breaks table sort order

Robert Šajina
Robert Šajina Member Posts: 94
edited Jun 27, 2018 8:25AM in JDeveloper and ADF

The problem occurs when a new task flow is opened and default activity is SetCurrentRowWithKeyValue. If the row is found within the N first rows (where N is range size of iterator) and the table is working with pagination then it works okay. But if the row is not found within the first N rows, then the row can be found on the second page (i.e. at N+1 position) and has been moved from its position after default sorting. The thing is that the record will always be placed in the N+1 position but never in its sorting position.

For instance if we show the table with two rows and if the key to search is "2", the row order would be alright: (note : underscore means next page)

Id   |    Name

______________

1    |    name_1

2    |    name_2

______________

3    |    name_3

4    |    name_4

______________

5    |    name_5

6    |    name_6

But if search for the key "5" then the table would look like this:

Id   |    Name

______________

1    |    name_1

2    |    name_2

______________

5    |    name_5

3    |    name_3

______________

4    |    name_4

6    |    name_6

it looks like the "problem" occurs when ADF is fetching data and appends the searched row after the initially fetch ones. This means (and we tested it) that if range size of iterator is set to -1, then all rows would be fetched and the searched row would be found in fetched rows not losing its position in the sorting order.

Our question is how to accomplish behavior like when the range size of iterator is set to -1 (i.e. setting current row without breaking sort order) but with normal value for range size (i.e. 10)

JDev 12.2.1.2.0

Thank you

Tagged:
This discussion has been closed.