You are viewing limited content. For full access, please sign in.

Question

Question

Forms 9.1 Lookup: Preventing lookup data from popping up

asked on January 24, 2014

Is there a way to prevent the pop-up list of SQL data when a user begins to enter data into a field that has a lookup rule?

 

We have fields that require a user to enter data for security purposes and do not want to provide them a list of choices that are being pulled from the SQL database.  It worked this way in 9.0, but 9.1 provides the pop-up list.

 

Any help is much appreciated!

3 0

Replies

replied on January 24, 2014 Show version history

This issue was resolved in Forms 9.1.1, which supports disabling the "auto-suggest" feature for lookup rules. You can also use a simple SQL stored procedure lookup rule to avoid this behavior.

 

The stored procedure lookup rule will take the value of a field as its input parameter and won't perform the lookup until the user leaves that field.

0 0
replied on March 4, 2014

Hi Eric,

Could you provide an example of a stored procedure that will prevent this behavior? 

 

Thanks,

Jen

0 0
replied on March 24, 2014

Hi Eric,

 

I want to second Jen's request. Please provide us with an example of a stored procedure that will prevent this behavior.

 

Thanks & Regards,

0 0
replied on March 24, 2014 Show version history

Stored procedures do not use the auto-fill behavior, so if you create a lookup with a stored procedure, you won't encounter this problem. Here's an example:

 

In this example, replace Database with the database that you'll use for the lookup. After the create statement, you declare the variables that will be your input parameters. In this example, I want to create a lookup that populates a few fields based on a case number. You can use multiple input parameters by separating them with commas.

 

USE [Database]
GO  
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_simpleLookup] 
       @casenumber nvarchar(50)

AS
BEGIN
         Declare @myTable table
    (
                caseNumber nvarchar(50),
                [day] nvarchar(50),
                gender nvarchar(50),
                race nvarchar(50)
    )
    INSERT INTO @myTable (caseNumber, day, gender, race)
    select CaseNumber, Gender, Day, Race from dbo.CaseFiles where CaseNumber = @casenumber
    select top 1  * from @mytable
END

You'll also need to replace dbo.CaseFiles with the appropriate table name. Once you've created the stored procedure, you can create a stored procedure lookup rule that uses it:

 

Additional information about using stored procedures in Forms is available on this page of the online help.

0 0
replied on March 26, 2014

Hi Eric,

 

Thanks for the instructions on the stored procedure. I successfully set it up.

 

Once my client enters their badgenumber in this case, the rest of the fields (firstname, lastname & employee id) are not auto-populated. I am able to run the stored procedure at the SQL level and get the desired outcome but not is forms. I have tried the Tab & Enter keys but nothing. Am I missing something?

0 0
replied on March 26, 2014

Did you update the data source in Forms after you created the stored procedure?

0 0
replied on March 27, 2014

Yes I updated the data source be able to see stored procedure listed under table/view.

 

When the data is input and you can click on Tab or enter, the rest of the fields don't auto-populate.

0 0
replied on March 27, 2014

It could be that the result set column names used in your stored procedure lookup rule aren't correct. Here's my lookup rule:

 

 

Here are my result set columns:

 

0 1
replied on March 27, 2014

Below is the set-up:

result sets column:

0 0
replied on March 27, 2014

I can't really say without seeing the stored procedure you wrote what's wrong. If that doesn't work, 9.1.1 is available and offers the flag that will disable the auto-suggest behavior.
 

0 0
replied on March 27, 2014 Show version history

here is the Stored procedure:

 

1 0
replied on February 5, 2014

Do you know when the maintenance release will be issued?

0 0
replied on February 13, 2014

Hi Marta,

 

It will be available early March.

 

Best wishes,

Abby

0 0
replied on March 13, 2014

9.1.1 is available in Support Site now.

0 0
replied on March 20, 2014 Show version history

I've updated Forms to 9.1.1 and added the "DisableAutoPopulateIn91" with value set to "true" in the cf_options table of the forms database, and I can confirm that the auto-suggest feature for single-line fields no longer pop up the lookup data. Great!

 

*However*

 

It also seems to disable the lookup values returned in drop-down menus. In 9.0 drop-downs would contain the lookup results, and single-line fields would not; this is preferable.  Is there anyway to achieve this again in 9.1.1?

 

 

0 0
replied on March 24, 2014

Hi Travis,

 

In order to achieve the populate list for drop-down fields, you will need to add a lookup rule for that. Please add a rule with no "match" condition but "fill" the drop-down list with your database lookup result.

0 0
replied on March 27, 2014

It could be that the result set column names used in your stored procedure lookup rule aren't correct. Here's my lookup rule:

 

 

Here are my result set columns:

 

replied on July 2, 2014

Hi Lena,

 

Can you explain this request a bit more? I wish to understand what you are asking Travis to do so that I may be able to do something similar with one of my companies processes.

0 0
replied on August 15, 2014

can we get more information on this idea of using match and fills? 

0 0
replied on August 15, 2014

I am wondering about Lena's suggestion as I am wondering how to best create a stored procedure that allows the user to select the first dropdown, then a second dropdown based off the values returned from the first value. when all is selected, i want a few other fields to fill in with the information that matches up to both dropdown options. If we do not use a stored procedure, then the normal DB lookup will suggest improper values in the second dropdown as it is not using the first value as a conditional value for the second variable.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.