October 23, 20169 yr 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
October 23, 20169 yr 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, 20169 yr by comment
October 23, 20169 yr Author 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.
October 23, 20169 yr 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.
June 1, 20187 yr Author 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, 20187 yr by Asu
Create an account or sign in to comment