Jump to content

Display search parameter on result page?


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

Recommended Posts

  • Newbies

I am trying to create a Search Page to search a FMPro5 database using [FMP-fieldname] as a search parameter and display the results on the Search.Result Page. In this case, let say the value for [FMP-fieldname]is Value1 before the search and after the search the value of [FMP-fieldname] is Value2. Is there anyway I can display [FMPro-fieldname] with Value1 as a heading on the Search.Result Page.

Link to comment
Share on other sites

From the FMP4 CDML reference...

[FMP-CurrentFind] ... [/FMP-CurrentFind]

In between these tags you use:

[FMP-FindFieldItem] is replaced with the field name that was part of the find request that created this page

[FMP-FindOpItem] is replaced with the search operator that was part of the find request that created this page

[FMP-FindValueItem] is replaced with the value that was part of the find request that created this page

So if you had on your results page the CDML code:

Current find request is<br>

[FMP-CurrentFind]Field=[FMP-FindFieldItem], Op=[FMP-FindOpItem], Value=[FMP-FindValue Item]<br>[/FMP-CurrentFind]

The results could look like:

Current find request is

Field=first name, Op=begins with, Value=Jos

Field=last name, Op=begins with, Value=Smith

--

Now, addressing your question: if you did a search on field1 for value1, how could you end up with a resulting record that had field1=value2? You cannot, becuase if it had value2 it would not have been found!

Link to comment
Share on other sites

  • Newbies

Thank you for your reply. Actually, my task involved searching three fields, say Fieldname1, Fieldname2 and Fieldname3 with Operator=Value1 and using logical operator=OR. So on the found set, Fieldname1 may or may not contain Value1, and the same is ture for Fieldname2 and Fieldname3. But I like to use Value1 for the heading for the found set. I did manage to find a solution by using a global field in my database that update Value1 for each search.

Link to comment
Share on other sites

This topic is 8681 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.