Script to delete rows

Generic selectors
Exact matches only
Search title only
Search in content
Search in all posts
Search in pages
Answers
Questions
316 viewsScriptingformula scripting
0

Hello,
I am trying to delete dept Tech and Sub dept C1 from Corp. I wrote the script:
|Department::Dept|.items.each {
if (|Department|.getSelection(it, |Department::Tech|).value.equals(“Tech”)) /*Trying to delete the Tech Dept*/
it.delete()
}
|Department::Dept|.items.each {
if (|Department|.getSelection(it, |Department::Corp|).value.equals(“C1”)) /* Trying to delete the C1 Sub Dept within Corp*/
it.delete()
}
But its giving me an error.  what am I missing?

Answered question

Attachments

Test.model
1

Hi,
Try the simplest A-script for the problem solve.

Answered question
0

This is the variant of the A-script with a preliminary request of the Items Group and Item for the Deletion.
Provided all the Items of the Dept category are divided into groups, the A-script works correctly.

Answered question
0

Thank you . Simplest A-Script works

Answered question