How do specify a dynamic range selection in scripting

Generic selectors
Exact matches only
Search title only
Search in content
Search in all posts
Search in pages
1.73K viewsScriptingcelsoft corporation scripting

How can I modify this script to do a dynamic range selection:
def itemSize = |HC Casual Labour Budget Input::’2′..Row|
I want to replace the ‘2’ in the first line to something that means the second item of a category Row no matter what the name of the second item is. I wish I could do something like:
def itemSize = |HC Casual Labour Budget Input::Row[FIRST+1]..Row|   so that it always selects from second row to the last row of the specified Row category.
Any help please

Answered question

For manipulations with the structure of the matrix (not with the values) it is easier to use cycles (loops). If you need to remove from the category all its items except the first one, use this a-script:
DeletionItems is A-script to delete all Items from D category but the first one
c = |Matrix2::D|
// Step 1. Deleting Items [0 .. 10] from D category
(0..<(c.items.size – 1)).each {
// Step 2. Renaming the last Item[11] to Item[1]
c.items[0].name = 1 // Done! 
// *******************************************************

Answered question
You are viewing 1 out of 6 answers, click here to view all answers.