guy tanguay Posted September 21, 2005 Posted September 21, 2005 Hi, I want to create a script that will perform a search on 2 differents field: Name and Status This script will automatically put a Name into the Name field: EX:Joe . at the same time ,I want it to do a multicriteria search for the status field EX: omit "Received" "Send" and "Ready to go". How can i do that ? thx guy
Søren Dyhr Posted September 21, 2005 Posted September 21, 2005 It all in the Perform Find scriptstep just check the "Specify the Find Request" ...in there build both of the kinds. --sd
guy tanguay Posted September 21, 2005 Author Posted September 21, 2005 Yes, perfect.I did figure it out yesterday. But i have a more tricky one. In one of my Database, I assign task to the staff. Every task does have a field. Every field is just a Pop-up list of every staff. This pop - up list correspond to every account in the database. When people log in to the database they use their own account. I would like to create a script, that perform a search by putting their "Current user Name" in every task field. So this way they will see all the work they have to do in 1 click. One of my idea was to create a Global field so the first thing the script will do is to set this field with "Current user Name" and them make a search in every field using the Global field as the filling for the search. But i can't make it work . Any ideas . . . thx Guy
mcyrulik Posted September 21, 2005 Posted September 21, 2005 As part of your search criteria, you could set the field Get(AccountName)that will filter your search to only the tasks that belong to that person. ~Mark
guy tanguay Posted September 21, 2005 Author Posted September 21, 2005 Yes, this is a good idea, but i just don't know how to apply it. This is what I did: Using ScriptMaker i was puttig Perform Find and them mark the "Specify find request" button. Inside the specify i was taking the "task field" and the criteria was Get(AccountName). The result of the search is no good because it put Literally : Get(AccountName) as the search criteria thx for your help guy
-Queue- Posted September 21, 2005 Posted September 21, 2005 The Restore option of Perform Find only works for static values. Dynamic criteria should be set by using, for example, Enter Find Mode [ ] Set Field [TaskField; Get(AccountName)] New Record/Request Set Field [status; "received"] Omit Record Duplicate Record/Request Set Field [status; "sent"] Duplicate Record/Request Set Field [status; "ready to go"] Perform Find [ ]
Søren Dyhr Posted September 22, 2005 Posted September 22, 2005 (edited) Restore option of Perform Find only works for static values Indeed! But they can be overwritten, take a look at this in a columnar layout while tracing thru the steps with the debugger: Set Error Capture [ On ] Perform Find [ Specified Find Requests: Find Records; Criteria: requestTest::field1: “nn” Omit Records; Criteria: requestTest::field2: “a” Omit Records; Criteria: requestTest::field2: “b” Omit Records; Criteria: requestTest::field2: “c” ] [ Restore ] Set Error Capture [ Off ] Modify Last Find Set Field [ requestTest::field1; Get ( UserName ) ] Perform Find [ ] What happens is, that what developer puts into one perform find scriptstep is split into 4 request, of which we only needs to change the first! --sd Edited September 22, 2005 by Guest
-Queue- Posted September 22, 2005 Posted September 22, 2005 Yes, this makes sense. But it is a bit too clunky for my taste and is not clear when viewing in ScriptMaker. I would be curious to know, though, whether performing the find twice takes more or less time than creating multiple requests does.
Søren Dyhr Posted September 22, 2005 Posted September 22, 2005 whether performing the find twice takes more or less time Yes I might give it a chase-test tomorrow, although wouldn't it be nice if it were posible to make a list line in assembler how fast each step is against each other. --sd
Recommended Posts
This topic is 7001 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