Crapples Posted January 9, 2008 Posted January 9, 2008 I have a portal with a single field in it. That field is defined as a button. I want to be able to return the contents of the clicked field when I click on it. In other words if the portal list looked like this: Mary Sally Bob ... and I clicked on the word Bob, I need a function that will return the word "Bob". I have tried get(activefieldcontents) with no luck. Any help? Thanks
AudioFreak Posted January 9, 2008 Posted January 9, 2008 Hi Crapples What do you mean by by "Return"? Do you want to copy the data to another field or just plain copy the data to the clipboard. If it's copy to another field just use the setfield script step and choose the related field. If it's just put to clipboard, use the copy script step. hth Michael
Søren Dyhr Posted January 9, 2008 Posted January 9, 2008 Shouldn't we raise the yellow flares here?? Interactions with the clipboard is a big no-no, unless the use is to use the data in another application, not run by filemaker... --sd
Crapples Posted January 9, 2008 Author Posted January 9, 2008 Thanks for the reply. What I mean by "return" is that I want to take the value of the clicked-on portal row and set it as a variable. Then move to another table and perform a search based on it. But I can't find the script step that will "get" the contents of the field that I click on. I'll see what I can do with the copy step right now.
AudioFreak Posted January 9, 2008 Posted January 9, 2008 I agree soren it can cause mass problems witin filemaker but if the user wants to paste that data in an outside source then I think it can be ok as long as the script is one step ONLY Copy[PO_Number] for example. If the data is to be pasted to another field in Filemaker then Set Field is the way to go for sure.
David Jondreau Posted January 9, 2008 Posted January 9, 2008 Have you tried just using the name of the field? Don't use the Copy script step, AudioFreak mentioned that because it was unclear what you were trying to do. It's not appropriate. W What you want is Set Variable[$field; relatedtable::Field]. $field is the variable declaration. relatedTable::field is the field with Sally or Bob in it as defined from where you are. Then in your script, you Go To Layout and Set Field [table::field; $field].
AudioFreak Posted January 9, 2008 Posted January 9, 2008 Use the Set Variable script step to put the value in the variable. Then use the set field script step using the stored variable before the perform find script step. If you need an example of this I will write one out for you. hth MIchael
Crapples Posted January 9, 2008 Author Posted January 9, 2008 D J - That worked. I'm actually surprised it did, but it did. Now that I have the contents of the field in the variable, I can go forth and use if for other things. Thanks a lot for your help. BR
Recommended Posts
This topic is 6164 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