« xfa.host.setFocus() | Main | FormCalc Syntax Error Tips »

A Shortcut for Inserting SOM Expressions into your Script

The XFA scripting model can be a bit... overwhelming... sometimes.  It can be hard to figure out what SOM expression you need need to use.  But there is an alternative to typing out a long, many-layered-SOM-expression.  While typing in the script editor, if you hold down the CTRL key and click on an object on the canvas, the object's SOM expression will be inserted into your script.  The SOM expression will be relative to the object hosting the script. 

If you want the absolute SOM, then hold down CTRL+SHIFT and click on the object.

Please note that this trick only works when clicking on objects on the canvas, not in the hierarchy dialog.

Comments

Wow, thank you very much!

Thanks for posting this. I've been looking for this answer for over 2 days!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)