Choose Language Hide Translation Bar

Re: How to write a command on Formula-Character

Hi Bernie,

I'm sorry this isn't working for you! I think I may have chosen an ambiguous column name which I think might be the source of the confusion. In the attached dataset I have a column named "OriginalColumn"  and the script below references that column in the Word() function. The word function doesn't take any arguments for which words it is looking for, only which word number, and the column to look in. It was my mistake to use a column name of "Class" when that was what you were looking to remove!  Let me know if the script below works for the attached table. If it does, you should be able to change it around to work for any table you want by changing " :OriginalColumn " to match whatever the name is of the column in your table.


//Make a new column

Current Data Table() << New Column("ClassNumberOnly", Character);

//stop table update until all changes are made, good for large tables

Current Data Table() << Begin Data Update;

//Apply changes to each row

For Each Row(

  :ClassNumberOnly = Word( 2, :OriginalColumn )


// End "Data Update"

Current Data Table() << End Data Update;

0 Kudos