Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Position of an item in response to a value

Avatar

Level 2

I need to set the x/y coordinates of an object in response to the value in a field.  So for example if the field value is 25, the object needs to be 25mm to the right of a particular point.

Any help gratefully received.

Many thanks...H0rrorhound.

3 Replies

Avatar

Level 10

Hi,

this is not very difficult.

Assuming you have a rectangle "Square" wrapped in a positioned subform "SquareArea" you can use FormCalc in the exit:Event of a numeric field to manipulate the position of Square within SquareArea with:

and  

The rectangle will change it's position relative to the upper left corner of SquareArea.

Avatar

Level 2

Hi Radzmar,

Many thanks for your fast response.

I'm really not a programmer, and easy to you...not so much for me!

I have created the rectangle and subform you have suggested, and the

numeric field in place, but I really need the actual code to enter in

the exit event of the numeric field.

Any further help you can provide would be really gratefully received.

Kindest regards...Polly.

Avatar

Level 2

Ignore me, apologies...I was trying to do it in Java, not FormCalc.

Done now! Many thanks for your help!