Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7066 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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"/>

Posted

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

Posted

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

Posted

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

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.