Asu Posted October 23, 2016 Posted October 23, 2016 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
comment Posted October 23, 2016 Posted October 23, 2016 (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 October 23, 2016 by comment 1
Asu Posted October 23, 2016 Author Posted October 23, 2016 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.
comment Posted October 23, 2016 Posted October 23, 2016 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.
Asu Posted June 1, 2018 Author Posted June 1, 2018 (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 June 1, 2018 by Asu
Recommended Posts
This topic is 2639 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 accountSign in
Already have an account? Sign in here.
Sign In Now