capint
1/26/2016 - 9:41 AM

RCPTT >> Useful script

RCPTT >> Useful script

>> Verify that a tab item does not exist
  with [get-editor "Project - Activity Explorer" | get-tab-folder] {
      verify-error {get-tab-item "Operational Analysis"}
  }

>> Loop through a table, check the table item having a column's name given as input
  with [get-window "Viewpoints Selection"] {
  	let [val table [get-table]]
  	{
  		$table | get-items | foreach [val item] {
  		    if [$item | get-property "columns[2]" -raw | eq "Common"] {
  		    	let [val index [$item | get-property index -raw]] {
  		    		$table | get-cell $index 0 | uncheck
  		    	}
  		  	}
  	  	}
  	}
  }