the easiest way to do this is to define another field and under field options in the «Auto-Enter» tab, you check «calculated value» and «specify». There you can type the following calculation (replace <…> with your actual names):
Left ( <tablename>::<originalfieldname>; 50)
The new field will contain only the first 50 characters of the original field.
Is that what you are looking for?
sorry - i am confused. in the original field i have over 7,000 different names. some are too long and i need to cut off.
What is a «field» for you? In FileMaker, that's where you type data. You probably mean that you have a table that has 7000 records and they all have different names in their name field. Correct?
Ok, what you do: You go to the menu File => Manage => Database, then you go to the «Fields» tab, write a new name for your field (maybe «name_trunc») and right next to it, you choose «Calculation» from the pop up menu. A window opens and there you paste and edit the formula from above.
When you look back at your data, you can see a new «field» that contains only the first 50 characters of your original name field. So, from now on, whenever you change an original name, it is automatically reflected in the new name_trunc field. Cool?
Hope this helps,
i am missing a step somewhere and cannot get this to work properly.
You havent provided any feedback. You havent stated what you have tried or what isnt exactly working. Just stating that it doesnt work will not allow people to continue assisting as we are not mind readers.
i cannot write the scripting properly. i have not been working on this since mid morning. i do not know where to go from here.
Did you try what Gary suggested? You still havent even mentioned if you clarified the terminology. Here lets try this again from scratch. Please post your situation, what you are looking to do, and some samples.
You do not need a script. Go to your field definitions and create a new calculation (result is text) and put this:
Left ( 'select your original field name here' ; 50 )
Then just place this calculation field on your layouts.
Field name (URL): www.yahoo.com
some time this length exceeds 50 characters
i would like to do a mid command or @left and create a new field that contains this field - with less than 50 charactrs
New Field (NEW):
Then follow LaRetta's instructions.
Go to File --> Manage --> Database --> Fields:
Create a new calculation field with formula of:
Left ( URL; 50 ) with text result