January 22, 201015 yr I'm having trouble with a custom function that applies formatting to phone numbers. For some reason this custom function is only applied to new data that I put into the phone number fields. If I perform an import of data the formatting is not applied until I either add a digit or remove it and then readd it. Is there any way to apply this formatting automatically across all of my phone numbers?
January 22, 201015 yr Hi James, Are you sure you are using a Custom Function? You do not show your Advance in your Profile. A Custom Function should automatically apply the formatting to your field, no matter how the raw data is put into it. This sounds more like what happens when you are using the Auto Entry by Calculated Value to me. Lee
January 22, 201015 yr Author Welp, I never claimed to be an Advanced user and you are correct, I am using the auto enter calculation to accomplish this. I am using a custom function to replace the existing value though. Is this the correct method to do this? Right now I am using the calculated value "PhoneMask ( Clinic Fax Number )" to accomplish this Edited January 22, 201015 yr by Guest
January 22, 201015 yr You're missing the point. I never claimed to be an [color:blue]Advanced user, The Skill Level of Advance, is [color:red]not the same as the Advance Edition of FileMaker, which cost more than the Regular Edition of FileMaker, because it comes with developer tools, one of which is the ability to create and use Custom Functions in your files. This Topic is reserved for the discussion of Custom Functions. Many custom funtions like the PhoneMask (number) Link can be used as a normal calculation like you have done, however, you have to be careful that they are not recursive. When [color:blue]importing your records, be sure to check the box that says "Perform the Auto Enter" in the import box sub popup. To change the existing data in the field, you can change the field type to a Calculation. the Calculation Box will have the PhoneMask (number) Calculation in it, so just click Okay, and Return to Browse Mode. Your data will be updated to the format text. Then, go back into Define Fields, and change the Field Type back to Text, and then check the Auto Enter, your calculation will already be there. HTH Lee Edited January 22, 201015 yr by Guest
January 22, 201015 yr The [color:blue]Attachment feature for this list is still not working. Edited January 22, 201015 yr by Guest
January 25, 201015 yr To change the existing data in the field, you can change the field type to a Calculation. the Calculation Box will have the PhoneMask (number) Calculation in it, so just click Okay, and Return to Browse Mode. Your data will be updated to the format text. Then, go back into Define Fields, and change the Field Type back to Text, and then check the Auto Enter, your calculation will already be there. HTH Lee Just a little something to add here, this will only work if you enable full indexing when changing the field to be a calculation. T
January 25, 201015 yr Just a little something to add here, this will only work if you enable full indexing when changing the field to be a calculation. Hi Tony, AFAIK, indexing has nothing to do with it working or not. I believe the confusion comes when the standard field has auto-enter (replace) and references a global or unstored field/calculation. If you change it to a calculation and leave the globals (or other unstored fields/Get() functions etc) within the calculation then the calculation will insist upon being unstored. In that case, you will LOSE YOUR DATA in that field when you switch it back to standard field. The process suggested by Lee works fine (I've used it for years) if it is applied to standard data (because it is stored). When you change it to a calculation, look in Storage Options and verify that 'Do not store calculation results' is NOT checked. If it is UNSTORED, it means your calculation will not re-set the data in the fields when you change it back. It is always recommended that you back up before applying any mass data change and, in this process, verify that the calculation can be stored (isn't checked as 'unstored'). If you can provide an example where indexing plays a role in this process, I'd love to learn about it; I've been wrong before and I'll be wrong in the future and I could be wrong in the present. :smile2:
Create an account or sign in to comment