Deleting specific formulas from a matrix using script?

109 viewsScripting

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

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.




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

that worked perfectly thank you!