-
Notifications
You must be signed in to change notification settings - Fork 0
Noodle PageLineSeq() Method
Dan Kranz edited this page Oct 3, 2021
·
1 revision
Add sequence numbers to a column within the detail portion of a data view page. Sequence numbers start at 1 and increment by 1 for each line on the page.
Noodle is useful for maintaining data lists. When inserting new rows, or moving rows around in a list, one needs to make data updates to preserve the sort order desired by the user. PageLineSeq facilitates this chore.
PageLineSeq(page, bfi)
Parameter | Description |
---|---|
page | Page number in data view |
bfi | Field index |
var items = [
["1","Vegetable","Tree","1"],
["2","Animal","Bird","1"],
["3","Mineral","Diamond","1"],
["4","Vegetable","Flower","1"],
["5","Vegetable","Grass","1"],
["6","Animal","Cat","1"],
["7","Animal","Dog","1"],
["8","Mineral","Ruby","1"],
["9","Mineral","Quartz","1"]
];
var db1 = new Noodle(items, ["Seq","Category","Item","Count"]);
// Create a new data view, Items by Category
db1.InitializeView();
db1.EnterHeader(2);
db1.EnterColumnar(1);
db1.EnterColumnar(3);
db1.GenerateView();
// Create a new line with Item value = "Cougar"
db1.OpenLine(1, 2);
db1.PutValue("Cougar", 1, 2, 3);
// Update Sequence values to maintain the sort order
db1.PageLineSeq(1, 1);