July 14, 200619 yr In Scriptmaker, is there a way to use the contents of a global field as the query for a find request? How do I do this? Or is the answer right under my nose? Thanks all - Daniel Edited July 14, 200619 yr by Guest
July 14, 200619 yr Author WEll, this page makes it pretty clear that I can't. Is there another way of accomplishing this? I want to be able to run a script where it asks the user for some text, and that text is used for a find.
July 14, 200619 yr If data is entered into the globals while in Browse Mode, you can use that data in Find Mode to set criteria into fields. The script steps are pretty straight forward: //Assume gSalesperson is a global with a value already set Enter Find Mode [] Set Field [ Salesperson ; gSalesperson ] Perform Find []
July 14, 200619 yr Yup. If I understand the question the answer is pretty simple. 1. Create a field in either that same table you are searching or another table. Format it as TEXT type (I assume) and set the storage as GLOBAL. In this example I'm calling it: TempText1 2. Make a script something like this: Show Custom Dialog [Table::TempText1]* Enter Find Mode [] Set Field [Table::YourNormalField; Table::TempText1] Perform Find [] *When you're setting up the custom dialog you will need to use an input field. See the INPUT FIELD tab. It is there where you will specify the Table::TempText1 field. This script is the bare minimum. You may want to consider error handling too but this example should get you on your way.
July 14, 200619 yr Author Thanks, guys - worked like a charm. Now I find myself with another problem, though: My global field will include the name of another field. How, in my script, do I go to that field? If it were a one-time thing, I would just hard-code the field into the script. But the field that I want to go to will change every time.
July 14, 200619 yr Check out the getfield() function. Remember Don Adams as Maxwell Smart? Sure Chief.
July 15, 200619 yr Ender, you're showing your age; I thought you were a youngster... I was just thinking; agent 99 IS probably 99 now!
July 15, 200619 yr Naw, I was just glued to the re-runs back in my childhood. I liked how the doors opened & closed at the start & end of every show.
Create an account or sign in to comment