simonr Posted November 26, 2001 Posted November 26, 2001 on our site, you do a find on the database which gives you alist of results. This is fine. Problem is that later on in the site I have a "back to search results" button which needs to do the obvious. What cdml tags do I need to use to do this. I am quite new to Filemaker so any help would be appreciated.
CyberSport Posted November 26, 2001 Posted November 26, 2001 I store the previous search request in a -token, by storing the current find request inside the token and adding the "&" and "+" signs (e.g., -token: sport=football&). Then, the link just references that token, so that essentially, they "redo" the find. That also ensures updated page so that if they've made changes on some records and then need to do the same on others, they can see which ones they've already modified. I can give you the exact code if you want... bevin
simonr Posted November 27, 2001 Author Posted November 27, 2001 Hello Cybersport, thanks for your help so far. I can see what you mean. If you don't mind an example of the code would be helpful. Thanks.
CyberSport Posted November 27, 2001 Posted November 27, 2001 okay, the first code goes on the search results page, a hyperlinked field such as last name, so when you click on the last name, you can edit the record. below is the link: FMPro?-db=Central&-lay=Master&-format=editlw.htm&-RecID=[FMP-CurrentRecID]&-token=[FMP-CURRENTFIND][FMP-FINDFIELDITEM:%20HTML]=[FMP-findvalueitem][/FMP-CURRENTFIND]&-find notice how i set the token. then, you have the edited record page. put the following in the body of that page: <INPUT TYPE="hidden" NAME="-Token" VALUE="[FMP-CurrentToken]"> then you have the record edit reply page. it's another hyperlink, which says something akin to : click here to return to your search results (remember, it's actually going to perform another search). this is the hyperlink: FMPro?-db=Central&-lay=Master&-format=evalteamresult.htm&[FMP-CurrentToken]&-sortfield=Last&-find the currenttoken is really going to read something like: &fallsmushed=MCC where fallsmushed is the name of a fall sport (the find field item) and MCC is the code for the sport (the find value item) i'm working on this for searches involving multiple search fields... bevin
Anatoli Posted November 28, 2001 Posted November 28, 2001 For going back to result page I am using the "javascript:history.go(-1)" link and works well. User has to play by rules and have JavaScript on. So far not a single objection from users for two years. This link is NOT doing another search; that is better in overloaded FileMaker.
CyberSport Posted November 30, 2001 Posted November 30, 2001 I agree with Anatoli's solution, but does it refresh the page? The reason I'm asking is, like I said, often times if the individual is editing multiple records, it's helpful to see which ones have already been edited. If it's not too overloaded of a database, I'd say go ahead and refresh the results.
Anatoli Posted November 30, 2001 Posted November 30, 2001 quote: Originally posted by CyberSport: I agree with Anatoli's solution, but does it refresh the page? The reason I'm asking is, like I said, often times if the individual is editing multiple records, it's helpful to see which ones have already been edited. If it's not too overloaded of a database, I'd say go ahead and refresh the results. See above: This link is NOT doing another search; that is better in overloaded FileMaker. If you do not need just "going back" but also refresh, this is no good, especially in IE.
Garry Claridge Posted December 1, 2001 Posted December 1, 2001 For a number of projects I have developed we used frames for this purpose. That is, the search results remain visible in one frame and the details of any selected item are displayed in an other frame. The details can even be displayed in a new window. Hope this is of interest. Garry
jburge Posted December 14, 2001 Posted December 14, 2001 FWIW all, I had to do the same thing only with multiple fields. I took advantage of the edit permission that our online clients already had (for one field) to create a work-around. I first created a global field in the db called "currentFind". When the user selects a hyperlinked record number from their search results, the currentfind data is written to the db: <a href="[FMP-link:rsfma]&-format=edit.html&-recID=[FMP-currentRecID]¤tFind= [FMP-currentFind] [FMP-findFieldItem]=[FMP-findValueItem]_ [/FMP-currentFind] &-edit">[FMP-currentRecordNumber]</a> Notice the action tag is "-edit", and there is an additional underscore at the end of the currentFind data to act as a delimiter in the global text field. Data is returned as: findFieldItem=fieldValueItem_findFieldItem=fieldValueItem_ (etc.) Then, I set up a calculation field called "returnFind" that substitutes "&" for underscores and "%20" for any spaces that might be entered by the user: Substitute(Substitute(currentFind, "_", "&"), " ", "%20") Finally, after the client makes their edits and the results page is returned, I can grab the cleaned up find data and use it in the "return to search list" link: <a href="FMPro?-db=myDB.fp5&-lay=layoutName&-format=results.html &-error=results.html&-sortField=lastName&-sortOrder=ascend &[FMP-field: returnFind]-find">Return to search results list</a> Hope that all makes sense! jb
jburge Posted December 17, 2001 Posted December 17, 2001 Maybe I missed something, but every time I tried passing it through the url, data was dropped after encountering an ampersand. Instead of: -token=field=value&field=value&field=value, etc. I would get: -token=field=value I also tried putting [FMP-link: drlsmkta] (stripping everything out except the find info) into the token, but it too would drop everything past the first ampersand. I figured this was a problem in trying to pass it through the url. jb
Newbies jenn Posted December 18, 2001 Newbies Posted December 18, 2001 quote: Originally posted by Anatoli: This link is NOT doing another search; that is better in overloaded FileMaker. What does "overloaded Filemaker" mean?
Anatoli Posted December 18, 2001 Posted December 18, 2001 Depending on machine type and speed and OS, single FileMaker Unlimited can process 1-10 "transactions" per second. If you are reaching this number, everything slows down and FM is overloaded with requests. It also depends on type of transactions. To Find 20 records and sending them to browser from total number of 10 000 or 100 000 records is not big difference. However, if you are serving all records (that is fast) and you must reverse sort them after -findAll to "newest first", then you see noticeable processing time difference between those 2 transactions.
Recommended Posts
This topic is 8445 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