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

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

Recommended Posts

Posted

Hello FM Mavens, 

I would like to be able to change an attribute (happens to be the size) of a selection in a text window with a script. (Basically, as if moving the size selector from the Formatting Bar into a button on a layout).

I created a script that cuts the selection, puts it in another text field, makes the change, cuts it out and goes back to the original field but by then the insertion point is gone. I can manually paste it back of course.  I wonder if there is a way to remember the insertion point somehow and make it a so the paste step uses it. 

Thanks

Asu

 

Posted (edited)

Why don't you do simply:

Insert Calculated Result [ TextSize ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get
( ActiveSelectionSize ) ) ; 18 ) ] 

This could be a button action, no script required.

 

Edited by comment
  • Like 1
Posted

Well, that's much better, thank you! While I have your attention: is there way to validate a calculation field for uniqueness? E.g. ding if in a new record both lastname and DOB are identical to an existing record? So to check if "lastname & DOB" is unique? Or to accomplish that in a different way? Thanks again. 

Posted
13 minutes ago, Asu said:

is there way to validate a calculation field for uniqueness?

No, but you can validate a Text field with auto-entered calculated value (replacing existing value).

 

18 minutes ago, Asu said:

While I have your attention

Please don't do that. Just start a new thread.

  • 1 year later...
Posted (edited)

Re the original question: A problem with the solution is that if the text that  needs to be reduced in size begins with bold characters then the entire resized area becomes bold. is there a way to avoid it?

Edited by Asu

This topic is 2359 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.