McScripta Posted October 29, 2014 Posted October 29, 2014 I have a total newb question... I'm trying to use TrimAll function. Where do I actually place the syntax trimAll(... etc. ?? I'm guessing I have to make a new script but then what do I choose in the left column of the Edit Script box? Sorry but I'm somewhat lost and thanks for suggestions
eos Posted October 29, 2014 Posted October 29, 2014 Functions are used in calculations, i.e. in the Specify Calculation dialog – which appears in field definitions, script steps, field validations … basically everywhere where a result can or must be calculated. I'm guessing I have to make a new script What exactly are you trying to achieve?
McScripta Posted October 29, 2014 Author Posted October 29, 2014 ohhh... Thanks for clarifying it. I have a field which will carry a numeric value. I need it to automatically: – remove all spaces in input – remove all dashes in input ...those 2 above is what I intended to use the TrimAll for. (I thought that triggering a script on field exit was the way to do it) – be exactly 14 digits; if input is shorter, leading 0's will need to be added automatically to fill 14 digits
eos Posted October 29, 2014 Posted October 29, 2014 I have a field […] I need it to automatically: […] Then check out the auto-enter calculation option in field definitions.
McScripta Posted October 29, 2014 Author Posted October 29, 2014 by "automatically" I meant "have FileMaker fix user input", sorry for not being clear I'm guessing I need to specify the calculation in Validation then
eos Posted October 29, 2014 Posted October 29, 2014 by "automatically" I meant "have FileMaker fix user input", sorry for not being clear I'm guessing I need to specify the calculation in Validation then You were clear, and so was I. Validation will alert you to validation violations, but it will not “fix user input“. Did you take a look at the auto-enter calculation feature, how it works and what it can do?
comment Posted October 29, 2014 Posted October 29, 2014 I have a field which will carry a numeric value. I need it to automatically: – remove all spaces in input – remove all dashes in input ...those 2 above is what I intended to use the TrimAll for. TrimAll() will not remove any dashes in the input. Perhaps you should consider something like = SerialIncrement ( "00000000000000" ; Self ) Given an entry of "23-56 70", the above will return "00000000235670". Make sure the target field is of type Text. To fix user input automatically, use the auto-enter calculated value (replace existing value) option - not validation.
McScripta Posted October 29, 2014 Author Posted October 29, 2014 I started looking into Filter functions and it did half of what I needed. Your suggestion, Comment, worked perfectly though. Thank you both. Learned a thing or two today
Recommended Posts
This topic is 3677 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