Darrin King Posted July 14, 2005 Posted July 14, 2005 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
Martin Brändle Posted July 14, 2005 Posted July 14, 2005 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"/>
Darrin King Posted July 18, 2005 Author Posted July 18, 2005 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
Darrin King Posted July 18, 2005 Author Posted July 18, 2005 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
Martin Brändle Posted July 19, 2005 Posted July 19, 2005 Use bw as suggested and read the FMSA CWP Guide, p. 83
Darrin King Posted July 20, 2005 Author Posted July 20, 2005 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
Martin Brändle Posted July 20, 2005 Posted July 20, 2005 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.
Recommended Posts
This topic is 7066 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