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