I ran a quick test as I don't normally script finds in this manner and found it was easy to set this up incorrectly. Make sure that you get the results shown in the following screen shot but with your field names in place of mine.
If your script step is set up exactly like this screen shot but with your field names in place of mine, make sure that the context_name field is of type text and not of type number.
For a different approach to scripting finds, see: Scripted Find Examples
Apologies but a goof on my part was compounded by a truly crappy internet connection. It took me a long time to correct the fact that I had the wrong image uploaded in my previous post. If you are monitoring this thread via email, please open the actual thread to see the edited post now in place.
Tnx for the fast reply!
I'll try it at once!
What it does is: perform the fist step, and at the beginning of the second is start all over (so, does a "find all" first).
Or so it seems. Because the "show only multiples for Person_id" [!] doesn't show.
The result is:
- find unique person_id (it does this perfectly)
- forget about find unique and just omit awbz in context_field
Somehow the second search dismisses the first.
These are my fields.
Perhaps you could get me going with the proper approach to scripting find-requests.
I've looked over the examples in your link, but it does not combine find&omit. There's the tricky part I guess.
When I test this on my sample file, it works perfectly.
What I see in your screen shot would seem to be correct results if the cases where you are seeing a single record was a case where you had two records with duplicate IDs, but one of the records had awz. In that case the first request finds all the duplicates, but then the omit request drops out the awz record--leaving behind what is now a single record with that ID as the other record was omitted.
I think, because of a little language barrier -I'm dutch-, I have not been clear.
Let me rephrase my question:
I have a database with Person_id's and context_names
A person can have multiple context_names
I want to see all persons with more thant one context_name, not counting context_name "awbz".
Example: Person_id = 1, context_name="DBC" and context_name="Aanmelding" - I want to see this.
Example2: Person_id = 2, context_name="DBC" - I don't want to see this
Example3: Person_id =3, context_name="DBC" and context_name="AWBZ" - I don't want to see this.
The script I used soo far does not do the job. Can you help me?
Ok, then your find script is working as it is designed to do. It just isn't producing the results that you expected. That is what I explained in my last post.
I don't have time to test this at this time, but the following may work:
Show All Records
PerformFind [Restore]---just one request to omit awbz
Constrain Found Set [Restore] ---Specify duplicates in the id field