AnsweredAssumed Answered

Script Trigger to remove formatting…

Question asked by flybynight on Jul 29, 2013
Latest reply on Jul 29, 2013 by flybynight

I know that I can define a field with an auto-enter calc to TextFormatRemove ( Self ), however… what to do when you already have a different auto-enter calc and want to preserve the "Do not replace existing value (if any)" behavior.

I'm trying to do it with a script trigger, but it's not working for me. I want to make just a simple script that I can apply to any field on a layout where users are likely to copy & paste in text and get rid of the formatting.

 

This is the 1-line script I have:

Set Field By Name [Get ( ActiveFieldName ); TextFormatRemove ( Get ( ActiveFieldName ) )]

 

I've been trying to just select the field and run this script from the Manage Scripts window, and it doesn't do what I'm expecting (get rid of bold, italic, other fonts, etc).

 

Once I have the script working, I plan to apply it as an On Object Exit trigger.

 

Always appreciate the help.

Thanks!

-Shawn

Outcomes