This is the Help File for the question
Removing Text Formatting From a Field in FileMaker Pro
How do I remove text formatting from a field?
Answer ID: 5674Last Updated: Dec 03, 2011
Thanks for the response, David. I know how to remove the text formatting. I just don't know how to combine the two expressions in my post together. Probably a simple operator; I just don't know how that should be formatted.
Nest your if function inside the textformatremove function:
TextFormatRemove ( If ( IsEmpty ( text access sku01 ) ; "" ; "$" & If ( text access sku01 ≥ 1000 ; Int ( text access sku01 / 1000 ) & "," ; "" ) & Right ( Int ( text access sku01 ) ; 3 ) & Left ( text access sku01 - Int ( text access sku01 ) + .001 ; 3 ) ) & " US" )
I've often wondered if there was a way to step through each field in a particular existing record to 'update' the format (remove any format that came in via cut/paste from another source). I've played around with some scripts, isolating the record of interest with the old
show all records
trick to show only the one record. I've written a few scripts to try and attempt a more elegant method than brute forcing each field of interest using the Replace Field Contents tool have failed. Ideally, I'd love to craft a way to start at the first field (in Tab order) of a layout,
set a page variable for that field's name using Set Variable [$FieldToFormat, Value Get (ActiveFieldName)]
then remove the formatting for that field, and loop through the next tab order field and repeat. Ultimately work my way through an entire data entry form to resolve all formatting snafus. Thus far, I've been stuck since using even simple tools like:
Set Field By Name [$FieldToFormat, TextFormatRemove (GetField ($FieldToFormat,))]
doesn't work as I expected. Formats remain. Bummer.
Any ideas of what I'm overlooking?
Filemaker Pro Advanced 11, OS 10.7.5