GManNAtl Posted January 19, 2007 Posted January 19, 2007 I am wanting to make a reusable script for a "Quick Find". Basically I want a script that I can pass via a script parameter the value I want to search for and the object names for say 3 fields I want the find to search for. Obviously this would not be necessary if I used the Set Field step, but I want this to be a script I can simply copy into any file and based on the script parameter passed would work on any table without any modification. For example I would pass "Name|object1|object2|object3" to the script. The script would then parse out the four values into variables $Value, $o1, $o2, and $o3 and search for the value in any of the three fields. Where I am at now is that I switch to find mode, and use the Go To Object script to go to $o1. This works fine, but how do I "paste or otherwise" the $Value into this field to perform the find. I can not paste because the $Value is not on the clipboard. I can not use the Set Field because I would have to specify the field and it would defeat the purpose of portability. Nor can I use relationships for the same reason. If I use the Insert Text step it simply pastes the text "$Value" into the field. Any ideas, or is there just a better approach that I am missing?? Thanks for any and all help!
Delta Tango Posted January 19, 2007 Posted January 19, 2007 Gosh, I had a similar problem a while back where I had to paste 20 data into 20 fields for 2,000 records and i didn't want to create 20 set field script steps. By the way, you have to use Insert calculated result, not set field for the paste to work correctly in that case. If I remember correctly, I used the evaulate function and simply used a string of text to define the field name. But that will only work when testing the field name. There is no way that I know of to dynamically create field names with the set field step. Did I help you at all?
comment Posted January 19, 2007 Posted January 19, 2007 You CAN use Set Field[] without specifying the field - it will set the currently selected field. So if you managed to make the correct field active by using Go To Object[], you should be fine. Of course, this method requires you to navigate to the correct layout, and the field/s in question to be on that layout.
GManNAtl Posted January 19, 2007 Author Posted January 19, 2007 You are the MAN comment! I guess it doesn't pay to work late into the night sometimes.
Recommended Posts
This topic is 6520 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