April 15, 200223 yr Newbies Yes...I need to cut the rightmost word in a field to the clipboard! How the heck can I do this? Thanks in advance! Stefan Garr
April 15, 200223 yr Create a global field "g_RightWord", then run this script: code: SetField["g_RightWord","RightWords(OrigText, 1)"] SetField["OrigText","Trim(Left(OrigText,Length(OrigText)-Length(g_RightWord)))"] Copy[select,"g_RightWord"] This will cut the rightword from OrigText and leave it in the clipboard so you can paste it elsewhere. If you want to just copy it to the clipboard instead of cutting it, omit the second step in the script. The Trim function will get rid of any leading and trailing spaces in the resulting text. This is an easy way of tidying up in case the user has entered more than one space between words. I assume that, because you want to have the right word in the clipboard, that you are then going to use this text outside of Filemaker. If your copied text is going to just be sent somewhere else in FileMaker, why not just use the first 2 steps of the script and set the field in the first step to where you want this text to end up. Russ [ April 15, 2002, 03:02 PM: Message edited by: Russell Baker ]
Create an account or sign in to comment