Jump to content

Trim ScriptTrigger that will work for any field


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

Recommended Posts

I know that there has to be a way to do this; and I don't want to make a Script Trigger for every field that needs this.

 

I thought that a Script Trigger OnObjectExit like this would work, but I am getting an error (102: Field is missing ).

 

Set Field By Name [  Get ( ActiveFieldName ) ; Trim ( Get ( ActiveFieldContents ) ) ] 

 

 

Am I doing something wrong, or am I misunderstanding Set Field By Name, or is there a better way to go about this?

 

Thank you

Link to comment
Share on other sites

I don't want to make a Script Trigger for every field that needs this.

 

Why don't you use the option to auto-enter a calculated value (replacing existing value) =

Trim ( Self )

As for your question, Set Field By Name[] requires a fully qualified field name, which can be calculated as =

Get ( ActiveFieldTableName ) & ":" & Get ( ActiveFieldName )
Link to comment
Share on other sites

This topic is 2818 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
 Share

×
×
  • Create New...

Important Information

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