Jump to content
  • 0
Sign in to follow this  
AprilNAPO

Help With Narrowing Report Containing Virtual Field And Keyword Searching Across Database

Question

Our database is designed to retrieve journal/magazine/etc. articles related to the user search term.

 

 We have used the guides for 'How to do a keyword search across multiple fields' and 'Separate Search Page and Results page' to create our search and results forms. 

 

Our search form currently allows users to search across the database using one entry/search field 'Search Phrase'. We want to add additional boxes to our search form to refine the search - search for specific author, title, etc. We can add these additional search fields but when we do, the results page returns ALL database records rather than the 2, 3, etc. that it should.

 

We are thinking this is something with either logic or the way the parameters are passed over. Ideally we want the search form to 'Search across database' and/or 'Search for specific author/title/etc.'. Right now we seem to be able to get one or the other, but not both. 

 

Any help would be greatly appreciated!

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

It worked great! We had to make one small change, since our first virtual field was designed to search across the database...but your instructions helped a ton. We've been able to get the search page set up the way we want and it seems good to go.

Thanks again for your response!

Share this post


Link to post
Share on other sites
  • 0

Hello AprilNAPO,

 

Sorry, I do not clear understand what is the expected result.

 

If a user enters "Phrase", and "author", and "title" he will see

all records where authors contains the "Phrase",

and all records where title contains the "Phrase",

and all records where authors contains the "author",

and all records where title contains the "title"

and so on.

 

Is it correct?

Share this post


Link to post
Share on other sites
  • 0

Thanks for responding.

 

Fields are: 

Search Phrase ___________

Author ___________

Title __________

 

Our goal is:

User enters 'clutter' in Search Phrase and returns 22 records, all of which contain 'clutter' somewhere in the record.

User enters 'clutter' in Search Phrase AND 'Franks' in Author and returns 5 records authored by 'Franks' AND containing the phrase 'clutter'

 

Our reality is:

Currently when the user enters 'clutter' in Search Phrase AND 'Franks' in Author the database returns 27 records - all records containing 'clutter' and all records authored by 'Franks'

 

I can't figure out the logic to get to the goal. I have recently introduced Criteria when configuring my filter fields, but no luck yet.

Share this post


Link to post
Share on other sites
  • 0

Hello AprilNAPO,

 

So, on your Search page you have three Virtual fields - Search Phrase, Author, and Title.

They pass parameters [@Phrase], [@Author],  and [@Title].

 

On your Result page you have two fields - Author and Title.

 

Please follow the next steps:

1) On the "Configure Filtering Fields" step add a Criteria for every field (click the "Insert" button and select "New Criteria").

Now the DataPage Elements is displayed like:

 

Author

  • Criteria 1
  • Criteria 2

Title

  • Criteria 1
  • Criteria 2

2) Select Criteria 1 of every field and make sure, that they are the same:

Contains [@Phrase]

 

3) Select Criteria 2 of every field and enter "their" parameter:

Contains [@Author], Contains [@Title]

 

Now the DataPage Elements should be like the following Schema:

 

Author

  • Criteria 1 Contains [@Phrase]
  • Criteria 2 Contains [@Author]

Title

 

  • Criteria 1 Contains [@Phrase]
  • Criteria 2 Contains [@Title]

4) Open the Logic tab.

4a) Make the main block "AND"

4b) Move all Criteria1 into the child "OR" block

4c) Move other Criteria in the child "AND" block

 

The Logic tab should be like the following Schema:

 

AND

  • OR
    • Author.Criteria1 Contains [@Phrase]
    • Title.Criteria1 Contains [@Phrase]
  • AND
    • Author.Criteria2 Contains [@Author]
    • Title.Criteria2 Contains [@Title]

 

I hope, it will work :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...