Help writing expressions

I’m trying to get my head around using expressions in Harmony. (the math kind)
I see the description in the user manual under Expression Columns, but I can’t seem to get it working.

For a test I’m trying to link the position Y movement of layer B to the Position Y movement of Layer A, but divided by 2 so that
B only moves half the distance of A… ( This is a simple example just to get familiar with the expression workflow)

In Maya I would simply write and expression stating that B_Pos_Y = A_Pos_Y / 2.

Here are the steps I’ve taken so far for the test:

  1. Create 2 layers A and B
  2. Create a move on A’s Y axis.
  3. Right click on A to share layer A’s functions. They are now visible in the Xsheet.
  4. Create and a new column in the Xsheet and make it an Expression Column.
  5. Double click the new Expression Column and write an expression. In this case I’m writing A_Pos_y / 2.
  6. Hit apply. I think I should see numbers showing up in the Expression Column but I don’t so I think this is the point of failure.
  7. Go to layer B’s transformation tab and in the Y position axis click the arrow, select expression and then point to the expression.
  8. Hit play. A moves but B remains static which means it didn’t work.

Any help you could give me getting familiar w/ writing expressions in Harmony would be greatly appreciated.

Thanks,
Jeff

For anyone interested, I got a quick reply from Support on this (Thanks!)

Expression were rewritten in Harmony 10+ and, unfortunately, the documentation has not been updated yet :frowning:
Before, the expression were not correctly structured. Now, we use javascript expression structure.

Try : value (“A_Pos_y”) / 2

that worked.

Jeff

I’m dipping my toe into trying to learn how to write Expressions, and I have a totally newb question.

so let’s say i have a drawing called fat_square that i want small_square to follow its X position at double the rate. i share fat_square’s functions and build an expression simialr to the one listed above

value ( “fat_square_Pos_x” ) *2

the expression column will generate values based on fat_square’s X position that i then connect to small_square’s X position through the layer properties. that makes sense.

what i dont get is that if i alter fat_square’s X position, the expression column does not update its values? is there something, another command, i am missing in my expression? again, im a total newb and any help would be appreciated!