Web Query?

Posted on 2003-03-18
Medium Priority
Last Modified: 2013-12-18

1. I have an editable field in a "FORM A" where the user inputs the value e.g "TESTING" and clicks submit.
2. On this click I need to lookup this value "TESTING" in a view and search for this value and if this value exist "TESTING".(then i need to redirect that user to "abc" URL or if it doesnt exist then redirect to some other "xyz" url)
3. I have a view with documents from some other form "FORM B" with docid and the reqd field value sorted which stores this document for lookup.

But the problem is how to get this value "TESTING" from "FORM A" and search in the "FORM B" and redirect.
Any ideas / suggestion on this will be appreciated

Question by:preeti_a
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
LVL 63

Expert Comment

ID: 8159754
Is this for web user only and with Domino R5?


Author Comment

ID: 8159886
Yes it is for web user
Domino 6
LVL 63

Expert Comment

ID: 8160014
Do you like to have this:

1.) You have a FormA showing an input Field. The value for this input field is your search value.
2.) You have a View with the first column sorted. You want to lookup whether the SearcValue is among the first columns of this searchable View.
3.) If the search value is found you like to show all documents from the view having this value.

If this is what you like to have, so tell me please whether this search value can be the complete Category of one of the categories in your searchable View.

Then you could use the R5 and R6 View feature: ShowSingleCategory

Tell me more details.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 8160532
The First two points of urs are perfect(this is what i want)
But i dont want to display any documents instead
the view which is having this document needs to compare at background and redirect the user accordingly on a click.
Also this view is storing documents from other form so i need to check this input field value from "form A" with "form B" documents.

The problem is that this two forms is not related to each other.

PS : This was my thought when i came across with this problem.
Create a field , capture the input field value and keeping this as a keyfield do a lookup in that view and do a comparing : But here i came across with a problem again , firstly as how to capture the input value , do a lookup , search and compare it and do the process and redirect ? on just one click :-(

I am getting confused...plz give me ideas.


Expert Comment

ID: 8161011
Create an agent and call it in your WebQuerySave event. In the agent, use something like this:

Set session = New NotesSession
Set doc = session.DocumentContext
Set db = session.CurrentDatabase
Set view = db.GetView("MyViewUsedForLookup")
Set LookupDoc = view.GetDocumentByKey(doc.EditableInputValue(0),True)

If LookupDoc Is Nothing Then
     Print "[xyz URL]"
     Print "[abc URL]"
End If

Make sure the Print "[URL]" is the last statement in the agent - this will cause the browser to be redirected to the [URL] that you have specified. Hope this helps.


Author Comment

ID: 8161139
Thanks Scott
Is there any other way,other than making use of an agent?

Reason : This nsf is residing on a server (site) which doesnt allow to create any agents :-(


Accepted Solution

scottrma earned 300 total points
ID: 8161414
You may have to make use of pass-thru HTML. Notes allows a special field called $$Return on a form that contains the content that the web user will see when they submit the form. You can create a formula value for this field and display different pass-thru HTML depending on whether the lookup document was found. Something like this:

begin := "<script language=JavaScript 1.2>";
temp := @DbLookup("":"NoCache"; ""; "MyLookupView"; EditableInputValue; 1);
middle := @If(@IsError(temp); "window.location='xyz URL'"; "window.location='abc URL'");
end := </script>
begin + middle + end

Hope this helps.


Author Comment

ID: 8165647
Thanks for ideas.
The point is yours.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question