Ingar Posted August 30, 2003 Posted August 30, 2003 Hi! Have the following sollution in FMP: calendar.fp5: Fields: date, name, time, NameID users.fp5: Fields: NameID, name, department NameID related to NameID, relationship is named Users. In calendar.fp5 I have a layout (list) with: date, time, name, nameID, users::department In Web companion i have an index.htm redirecting to: <a href="http://localhost/FMPro?-db=calendar.fp5&-lay=list&-format=search.htm&-findall"> In the search.htm i use this code: <HTML> <HEAD> <TITLE>Search</TITLE> </HEAD> <BODY> <H2>Title</H2> <FORM ACTION="FMPro" METHOD="post"> <INPUT TYPE="hidden" NAME="-Op" VALUE="eq" <INPUT TYPE="hidden" NAME="-error" VALUE="error.htm"> <INPUT TYPE="hidden" NAME="-format" VALUE="result.htm"> <INPUT TYPE="hidden" NAME="-lay" VALUE="form"> <INPUT TYPE="hidden" NAME="-db" VALUE="Calendar.fp5"> <P>Department: <SELECT NAME="-op" value="equals"> <OPTION SELECTED value="equals"> <OPTION value="not equals"> <OPTION value="contains"> <OPTION value="begins with"> <OPTION value="ends with"> </SELECT> <INPUT TYPE="text" NAME="[FMP-field: users::department]" VALUE=""> <P>To Date: <P> <SELECT NAME="-op" value="less than"> <OPTION value="equals"> <OPTION value="not equals"> <OPTION SELECTED value="less than"> <OPTION value="contains"> <OPTION value="begins with"> <OPTION value="ends with"> </SELECT> <P><INPUT TYPE="text" NAME="date" VALUE="[FMP-Currentdate]"> <P><!-- STEP 7. SPECIFY THE BUTTON ACTION--> <p><INPUT TYPE="submit" NAME="-find" VALUE="Search"></p> <p><INPUT TYPE="reset" VALUE="Reset"></p> </FORM> </BODY> </HTML> What I'm trying to do is to perform a find action with a department and a date to see all appointments for this department before a certain date. But if I put in the values "sales" and "08.08.2003" in the text boxes I only get the result: No records found. If I do the same find in the list- layout in FMP the records containg "sales" in the department field shows up just fine. It may be an easy answer to this, I'm pretty new to the CDML programming. ( I've tried to look trought the Fmforum, but haven't found an answer to this problem). Hope someone can help, as it seems to be quite a few FMP experts out there. Ingar
Garry Claridge Posted August 30, 2003 Posted August 30, 2003 Try this: <INPUT TYPE="text" NAME="users::department" VALUE=""> Garry
Anatoli Posted August 30, 2003 Posted August 30, 2003 RE: But if I put in the values "sales" and "08.08.2003" in the text boxes I only get the result: No records found. If I do the same find in the list- layout in FMP the records containg "sales" in the department field shows up just fine. As general tip: if you have problem with find from web, do the "Modify last find" or Ctrl-R in FM to see what values where passed from CDML. Another thing -- 08.08.2003 doesn't say us if that is US or European Date format. Instead of building very complex searches, you should start with single find and if it works add more search parameters.
Ingar Posted August 30, 2003 Author Posted August 30, 2003 Hi! Thanks a lot for your answers Anatoli and Garry, you both has helped me a lot. Sometimes I think it's like I'm going blind if I stare at the same problem to long. The removal of the [FMP-field: ] was one of things I had to do. The testing with the Find in FMP also helped me as I could see that the fields was filled out with the right words, but the search for "less than" in the date field was wrong. I use FrontPage to do the design at the Web site and I just edit the CDML code directly here. I had been testing the solution with the date find earlier and thought that I'd just added an extra search for the related field. But in this edit action I had open the properties for my Select "-op" and when I closed this, Frontpage renamed this to Select "D1". So the Find stopped in the date field and not in the Users:department as I believed. Again, thanks a lot Ingar
Anatoli Posted August 30, 2003 Posted August 30, 2003 If you can drop the FrontPage. It is probably OK for M$ things, but sucks as HTML editor. Get the 30-days evaluating GoLive and Dreamweaver and see, if that is better for you and the money are justified. Personally I do prefer GoLive with much smoother interface for me.
Recommended Posts
This topic is 7826 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