Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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.

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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

  • 2 weeks later...
Posted

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]&currentFind=

[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

Posted

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
Posted

quote:

Originally posted by Anatoli:

This link is NOT doing another search; that is better in overloaded FileMaker.

What does "overloaded Filemaker" mean?

Posted

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.

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 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.