proton Posted October 20, 2001 Posted October 20, 2001 Hey People, Geez I got a real humdinger here. Here's the problem. I have a filemaker enabled site I'm building. Now when users login they are assigned a code. This code is stored as a cookie. Now in the members database, another code is inserted in their record (this code is essentially the same as the cookie code but with some additional characters). N.B. For reasons too complicated to get into here the two codes can not be the same. Okay, I have a link that the users can click on to edit their record. The link essentially performs a find using the data in the cookie to locate the user's record and display it in an edit form so they can make changes. This is where the problem lies. I set the find criteria in the link. However, when the user clicks on the link it says no records found (initially it was an error in the cookie, but I sorted that out). When I went to the database file it had no records found. I did a Modify Last Find command and saw that the cookie data was being pasted in the correct field but it was not finding the data at all. I checked the data to make sure it was valid and it was. Remember the data in the cookie represents just part of the data in the field that I am performing the find on. So I copied the data that was in the cookie and attempted to perform the Find directly in the Filemaker database (if I get it to work in Filemaker I can get it to work in CDML). Did a standard find (pasted the data in the field) and it didn't work. So I decided to use operators. Tried the Literal (quotation marks around the data - aka -Op=cn) and it didn't work. Then tried some of the others and they didn't work. Finally I got it to work. The combination was *"data". So in other words I was using the Zero or more charactors symbol in combination with the Literal text symbol. Okay so I know what I need to work. In CDML, doing a find in a link I have to use the -Op tag, and I can specify what type of search I want. Contains or cn is equivalent to "data", and Ends With or ew is equivalent to *. Well, this brings me to my problems, of which there are two: 1) I created the link using just the -Op=cn and the find failed (as expected). However, when I went to the database and said Modify Last Find it pasted *data* in the field. Now the literature says that contains or cn should be "data". So I'm confused there. 2) I know how to specify one option with -op, as in -Op=bw. How does one specify two options (-Op=ew+cn maybe)? Sorry for the long, involved post. Hoping you all can help me out. Thanks in advance. [ October 20, 2001: Message edited by: proton ]
scratchmalogicalwax Posted October 25, 2001 Posted October 25, 2001 Hi Proton Web companion and -operator he he it's been the bane of many a FMPro web developer including me! I have always managed to find work arounds so have never really had to tackle the problem head on. I think there are a few posts in the archive that give some info on how to get them to work better......using JavaScript I seem to remember. It sounds like you are building solutions that would be more easily achieved with Lasso.....not that it's support for -operator is any better but there are more tags to use to find work arounds.....especially tinkering with strings when assigned to variables..... You didn't explain why the codes can't be the same......maybe looking at this could find the solution quicker than trying to get the operators to work reliably AND consistently. not much use.....good luck [ October 25, 2001: Message edited by: scratchmalogicalwax ]
proton Posted October 29, 2001 Author Posted October 29, 2001 quote: Originally posted by scratchmalogicalwax: Hi Proton Web companion and -operator he he it's been the bane of many a FMPro web developer including me! I have always managed to find work arounds so have never really had to tackle the problem head on. I think there are a few posts in the archive that give some info on how to get them to work better......using JavaScript I seem to remember. It sounds like you are building solutions that would be more easily achieved with Lasso.....not that it's support for -operator is any better but there are more tags to use to find work arounds.....especially tinkering with strings when assigned to variables..... You didn't explain why the codes can't be the same......maybe looking at this could find the solution quicker than trying to get the operators to work reliably AND consistently. not much use.....good luck [ October 25, 2001: Message edited by: scratchmalogicalwax ] The codes can't be the same for one reason. When the user logs in he is taken through a couple meta-refresh pages that perform a number of actions, for instance verifying that the username exists, that the password is valid, and assigning him a code automatically (which is placed in a cookie). This code is put in his record in the member's database and is used to generate another more complex code. This more complex code is different from the code in the cookie (but the cookie code is contained in it). Hmm...maybe I should look at redesigning it...I'll take a look and see what I come up with. Thanks for the help.
Garry Claridge Posted October 30, 2001 Posted October 30, 2001 "cn" should work as you require. I know that you have tested by pasting the code into FM when using find. Have you tested by "hardwiring" a code into the CDML? e.g.: <input type="hidden" name="-op" value="cn"> <input type="hidden" name="usercode" value="abc1234"> <input type="submit" name="-find" value="Find User"> All the best. Garry
proton Posted October 30, 2001 Author Posted October 30, 2001 quote: Originally posted by garrycl: "cn" should work as you require. I know that you have tested by pasting the code into FM when using find. Have you tested by "hardwiring" a code into the CDML? e.g.: <input type="hidden" name="-op" value="cn"> <input type="hidden" name="usercode" value="abc1234"> <input type="submit" name="-find" value="Find User"> All the best. Garry Hey People, I got the answer from another list I subscribe to. The code is: ...&-op=cn&Description===*[FMP-Cookie: usercode]*&-find It works perfectly! Thanks for all the suggestions!
Recommended Posts
This topic is 8494 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