July 14, 200520 yr Using the FileMaker Site Assistant, I generted a simple stylesheet that does a find on a database. The generated code provides a drop down menu for each field to select the desired operator. <tr> <td align="right" width="25%"> <b>ShortName: </b> </td> <td align="left" width="5%"> <select> <xsl:attribute name="name">ShortName.op</xsl:attribute> <option selected="selected" value="eq">Equals</option> </select> </td> <td align="left"> <input size="50" type="text"> <xsl:attribute name="name">ShortName</xsl:attribute> <xsl:attribute name="title">ShortName</xsl:attribute> </input> </td> </tr> Can these operators be hard coded so they are not a user definable selection? If so how? Thanks, Darrin
July 14, 200520 yr That's a HTML question. Instead of <select> <xsl:attribute name="name">ShortName.op</xsl:attribute> <option selected="selected" value="eq">Equals</option> </select> you can use <input type="hidden" name="ShortName.op" value="eq"/> If you don't want that the short name must match exactly, then use <input type="hidden" name="ShortName.op" value="bw"/>
July 18, 200520 yr Author Thanks Martin that answered by question. My problem now is it only works if a user enters data into a field. If a field is left blank then the match requirement is skipped. How do I make a find request require exact matches in two different fields (i.e. shortname AND password must match to find the record). I thought the tag would do the trick but it doesn't get me where I want to go. The find executes just fine with the password field blank. Thanks, Darrin
July 18, 200520 yr Author I replaced the following code for the password field: Password: Password Password With the suggested code of: Password: and FileMaker returns an error code of 401 (No Records Match Request). Note: I did change the operator value from 'bw' back to 'eq', but I've tested both ways and that doesn't seem to make a difference. What am I doing wrong? Thanks, Darrin
July 20, 200520 yr Author Ok, I switched back to using the bw keyword as suggested by you and page 83 of the FMSA CWP guide. Being able to access all the FMP find operators is a really cool feature! Unfortunately it is not working for me. I still get a 401 error (No Records Match Request) when I specify a value of "==". Any other thoughts? Compounding my frustration, I have discovered the CWP engine will pass wildcard find operators to the database. All someone needs to find a record (or records) in this solution are the first couple of characters of the ShortName and Password coupled with a "*". Not good since this is an authentication database I'm trying to grant access too. Thanks, Darrin
July 20, 200520 yr Hmm. How does the URL or the query after submitting the form look like? Add a in your second page. I was told in this forum and in other forums that the technique that I suggested to you might work. However it could be different with FM7. However, for me I use a separate technique that I just took over from my FM5-FM6 times. It uses a calculation field in the DB that combines name and password and also a JavaScript that does the form field merge upon submit and some additional checks (e.g. for wildcards). You might look at the source codes of http://www.clicaps.ethz.ch/fmi/xsl/myclicaps_login_en.xsl and http://www.clicaps.ethz.ch/js/submitkeys.js to get an idea.
Create an account or sign in to comment