Deleting specific formulas from a matrix using script?

213 viewsScripting
0

I’m running into an idea that’s beyond my scripting skills. I’m trying to delete all formulas from a matrix that contain specific text. I cobbled this together but it’s giving me a ‘No such property: formula for class:script’ warning. Am I close? Thanks for looking!

    |matrix|.getSelection(formula.text.split(".Total Group =")) {it.delete()}
Tahir Answered question June 11, 2024
0

Hi jeffc,

First, we should create a loop and go through all formulae in a matrix, then find a formula which contains specific text. If found, delete this formula. Please try this script below.

Tahir

|Matrix1|.formulae.each{

myFormula->

if (myFormula.text.contains("Total group"))    
    {
myFormula.delete()
}
}
jeffc Posted new comment June 12, 2024

that worked perfectly thank you!

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