Cluso Posted August 24, 2007 Posted August 24, 2007 So I wrote a script which searches an entire layout for a letter/word/phrase. How can I generalize this script so that I can run it on any given layout, and not have to make a custom search function for each layout? Currently, you can see (above) I am calling layout specific fields. I think need to use functions I guess to call fields dynamically, as they say. Explanation of script/variables: $search_term is the user inputed search string $search_field is the field being searched by the script in that particular iteration of the search function $end_field is the field the search ends on (it stores the field it started with, then goes through all fields its set to search, stopping when it returns to the first field it's already searched) The script searches all fields in the layout tab order.
Cluso Posted August 25, 2007 Author Posted August 25, 2007 just some rambling thoughts... I tried nesting a get(layoutname) function in the table specific commands and then amend the layout name with ::*name of field being called* but it failed. with set variable doing what I described just sets the value of the variable to the full name of the field, ie, set variable ( $search_term; Value: Get (layoutname) & "::simple_search" ) outputs "$search_term = All Gene Information::simple_search" NOT the VALUE for All Gene Information::simple_search ...this is annoying because when you specify the field straight up (no "get" function, etc), it just grabs the value of the field n/p so I cant figure out how to make the value of "set variable" be the field value... perhaps some complicated function also involving get (valueactivefield) or whatever...
The Shadow Posted August 25, 2007 Posted August 25, 2007 Try: set variable ( $search_term; Value: GetField( Get (layoutname) & "::simple_search" ) )
Recommended Posts
This topic is 6301 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