Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6367 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi,

I have looked through as many posts as I could, and googled my self to death...

I am trying to insert some calculated text in to a specific point in to another field. For example - I click in a text field containing a letter and edit the information. Then I want to click on a button to insert some text from a portal exactly where the cursor was.

I have tried 'Insert Calculated Result', but this only wants to insert the data at the end of the field. How can I pass the correct position to the script?

By the way...this is a great forum and my first post.

Thanks!

Posted

Unfortunatley, you're going to run into problems with that -- as soon as you click a button in a portal the main record is commited... or you leave the field (i forget).. Either way, the point is you immediately lose the position of the cursor which you could normally get using:

Get ( ActiveSelectionStart )

Posted

If say call the field "myField" and the data you wish to insert: theInsert as the string ...then do it this way:

Set[untitled::myField;Replace ( Untitled::myField ; 4 ; 0 ; "theInsert" )

...and you're not bound to have it shown in the present layout.

Read up on it's use here:

http://www.filemaker.com/help/FunctionsRef-373.html

--sd

This topic is 6367 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.