Uidoc.import

I am trying to use uidoc.import to import the contents of an html file into a rich text field on a form. The problem I am having is it always imports the contents into the beginning of the field, which is an issue when their is already text in the field. How can I get it to either append was is being imported or place it where the cursor is? Should I even be using the uidoc.import for this purpose?

Subject: uidoc.import

Import method does bring the data in where the cursor is sitting. All you have to do is change your code to not move the cursor from wherever it’s sitting. This is a problem if the code is in a button or hotspot in the form, since clicking it moves the focus from the RT field. But it works nicely in an action.

If you use GotoField, the cursor is positioned at the beginning of the field. There’s no single command to position it to the end of a field, though GotoBottom will work if the field is the last thing on the form. Or, you can use @Command([EditGotoField]) to go to the next field, and EditLeft to back up to the end of the previous field, and @Command([FileImport]) to do the import.