January 9, 200818 yr 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
January 9, 200818 yr 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
January 9, 200818 yr 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
January 9, 200818 yr Author 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.
January 9, 200818 yr 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.
January 9, 200818 yr 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].
January 9, 200818 yr 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
January 9, 200818 yr Author 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
Create an account or sign in to comment