Jump to content
Server Maintenance This Week. ×

searching defined by user's input


saralee

This topic is 5031 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi :

I have been working on a search in my database layout, and would really like to get some advice.

In my baby's database, I would like to search for households with babies that meet certain criteria as below-

in a certain age range;

speak certain language (e.g. 80% English);

have NOT participated in certain studies before (e.g. NOT studyX)

My script is real simple-

Go to Layout [Household]

Enter Find Mode [Restore]

Perform Find[]

In my Find criteria, I have-

Find records:

Babies::FullAge $AgeFromDays ... $AgeInDays

Languagues::%Lang =$LanPercentCri

Languagues::Lang =$LanSearchCri

Omit records:

Studies::StudyName [=$omitStudies]

I'm defining criteria using fields from different related tables, and I also used variables in the criteria. But the search is not working~

Any ideas? Much appreciate it! Thank you :

Link to comment
Share on other sites

This troubleshooting difficullty is exactly one reason why I much prefer not to use the approach you are taking. Instead, use "explicit scripted finds".

Enter find mode

Set field[ fieldA; $someVar ]

set field [ fieldB; $var2 ]

New Record/Request

Omit Record

set field [ fieldC; $var3 ]

Perform Find (no restore)

Link to comment
Share on other sites

Another question, though : I would like to search for a set of records based on some criteria in one layout, and then omit some records in another layout (which is related to the previously) and finally display the records in the latter layout..

For example, I need to search for babies (in the baby layout) who are 100-120 days old, hear 90% of English and not premature, and then I need to exclude households (in the household layout) who do not want to be contacted, and finally display those households that meet with all the above criteria.. Since the criteria based on the babies are related to info only in the baby table, I cannot perform all the searches in the household layout. I have to do the first search in the baby layout and then switch to household for the omitting part.

How should I switch between layouts and implement searches in different layouts in one single search? Thank you!

Link to comment
Share on other sites

This topic is 5031 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.