SET COLUMNSTOGGLE Position

The Help for the COLUMNSADD says:

The argument indicates the position to insert the column. This can be a number where 0 represents the left-most column, 1 the second column and so on. The position can also be specified relative to existing columns. For example, to add a column immediately after the Name column you would specify 1+Name for the position**.** To add it immediately before the Name column you would use 1-Name . You can also set pos to ! to leave it unchanged, or prefix it with ! to say it should be unchanged if the column is already present, but use the position specified after the ! if it is being added.

For COLUMNSTOGGLE it also says:

The position and size of added columns can be given as for COLUMNSADD .

And that works for 1+Name, my button having this as function:

SET COLUMNSTOGGLE=Keywords(1+Name)

puts the Tags column after the Name column. However, the opposite direction:

SET COLUMNSTOGGLE=Keywords(1-Name)

does not. This should put the Tags column between the Group and Name columns, immediately before the Name Column. But it does not. It always put the column in the leftmost position.

Check this short video here.

That's a mistake in the documentation. We'll get that fixed.

Use 0+ or 0- to place something in the same position as an existing column:

SET COLUMNSTOGGLE=Keywords(0+Name)

In other words, that will place the Keywords column 0 positions away from where the Name column is currently, pushing the Name column and anything to the right of it one position to the right.

1-Name would be the position of the column currently to the left of Name (which won't do anything if there is no column to the left of Name).

1 Like

Great, that works! Thanks, @Leo !

1 Like