saralee Posted July 30, 2010 Posted July 30, 2010 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 :
bruceR Posted July 30, 2010 Posted July 30, 2010 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)
saralee Posted July 30, 2010 Author Posted July 30, 2010 Thank you, Bruce! How about setting up range in the "set field" function? I couldn't figure that out..
bruceR Posted July 31, 2010 Posted July 31, 2010 If you have entered values in $date1 and $date2 then $date1 & ".." & $date2
saralee Posted August 4, 2010 Author Posted August 4, 2010 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!
Recommended Posts
This topic is 5223 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