rivet Posted July 3, 2003 Posted July 3, 2003 I can do a search on a user id, but can I do a search on multiplule id's at once? Same with dates.
Leb i Sol Posted July 3, 2003 Posted July 3, 2003 hi there! depends on you what kind of a serach u need...I saw a post here by mr. Knight (fmwebschools guy-sorry if I misspelled the name) who posted "submit mupltuple foms" :: _old post_ :: all the best!
Garry Claridge Posted July 3, 2003 Posted July 3, 2003 You can use "-lop=or", then: &myfield="value1 value2 value3 etc"&-find OR &myfield="value1"&myfield="value2"&myfield="value3"&-find Hope this helps. Garry
rivet Posted July 3, 2003 Author Posted July 3, 2003 wow that is nice... can it be pushed further? I would like both id's with the same date ...&-lop=or&_id=40&_id=80&datestart=06/05/2003&-find
Garry Claridge Posted July 3, 2003 Posted July 3, 2003 The major drawback is that you only have one "-lop" So it is either "OR" or "AND" for all fields. This is a real problem with CDML. I have had to use [FMP-IF] statements to perform combined "OR" and "AND" searches. Somebody may have a better method. Good Luck. Garry
rivet Posted July 4, 2003 Author Posted July 4, 2003 how about this, The is an actual field that has the two merged. id&date so is there away to get the submitted fields to string together and then do a request the on the merge field? maybe if I set them to tokens and then request [token1][token2] what do you think?
Fenton Posted July 4, 2003 Posted July 4, 2003 Theoretically, you could build a "concatenated" field, of ID & " " DateToText(Date), result text, in FileMaker. Then, on your web page(s), put your 3 input fields together with JavaScript, write to the <input> tag for the concatenated field, then submit. It would only be 2 requests, with an "or" operator. Actually the above would have to happen on a meta-refresh page. The regular page would do a -Find for the IDs & the Dates (or operator). The Find would be sure to succeed, if any of them matched. But you'd only be using the Find to get the Find criteria, by setting into Tokens (with JavaScript) or by retrieving on the meta page with Find criteria tags, then submit the 2nd Find with the concatenated criteria. You can go to your FileMaker database and run Modify Last Find to see what ended up as the Find. I would have to experiment to get even close however. As I said, theoretical. I did something like this once and it worked, but it had fewer criteria. Anyone get any closer?
Garry Claridge Posted July 4, 2003 Posted July 4, 2003 This is how you could setup the Form: <form name="findfm" action="FMPro" method="POST" onsubmit="Javascript:setfields();return false;"> Enter Date: <input type="text" name="" value=""> Enter ID: <input type="text" name="" value=""> Enter ID: <input type="text" name="" value=""> . . <input type="hidden" name="combofield" value=""> <input type="hidden" name="-lop" value="or"> <input type="hidden" name="-db" ....... . <input type="button" value="Find Records" onclick="Javascript:setfields();"> </form> This is how the Javascript could look in the <head> tags: <script> function setfields() { with (document.findfm) { combofield.value = elements[1].value + elements[0].value ; if (elements[2].value != "") { combofield.value += " " + elements[2].value + elements[0].value ; } submit() ; } } </script> Hope this is of help. All the best. Garry
rivet Posted July 4, 2003 Author Posted July 4, 2003 looks interesting (scarry ) I will try it - much thanks everyone
Leb i Sol Posted July 7, 2003 Posted July 7, 2003 just a side note on merged fields: look at this 405077 now can u tell what two IDs I have typed? was it 405 and 77? was it 4050 77? u get the idea...joined them with a "," or something that seprates them consider this when searching through the filed. I would go with Gary's idea of JavaScripts and passing variables...perhaps build the URL as u wrote it... anyhow, all the best!
Recommended Posts
This topic is 7879 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