October 29, 201411 yr 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
October 29, 201411 yr 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?
October 29, 201411 yr Author 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
October 29, 201411 yr I have a field […] I need it to automatically: […] Then check out the auto-enter calculation option in field definitions.
October 29, 201411 yr Author 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
October 29, 201411 yr 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?
October 29, 201411 yr 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.
October 29, 201411 yr Author 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
Create an account or sign in to comment