Newbies stefangarr Posted April 15, 2002 Newbies Posted April 15, 2002 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
RussBaker Posted April 15, 2002 Posted April 15, 2002 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 ]
Recommended Posts
This topic is 8329 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now