lookup

  • 2 August 2022
  • 0 replies
  • 46 views

This article is about the lookup UDB event handler.

lookup

The lookup event may be called from web pages developed in Web Designer and processed by a USoft page engine service.

Event Applies to Occurs when
lookup
Data objects of input controls When the lookup button at the input control is clicked

This event applies to Data objects for input controls that take foreign key values. They are input controls in a child table that offer a lookup button for looking up values in a parent table.

How to use

Find or create an Event Listener object with Event Type = lookup. Event Listeners are in the Web Designer Controls catalog:

Insert the event listener into the Data child object of the input control object. Insert a callClientScript action into the event listener. Use this action's Script property to code the behaviour that you want to see when the event occurs.

You are altering the default lookup functionality represented by the .navigateToLookup() function. If you want to offer the lookup functionality only if condition is satisfied, give the event handler the following script to execute:

if ( condition )
$.udb.navigateToLookup("lookup page", { ... });

When USoft publishes runtime lookup behavior, it generates a lookup button and transfers the lookup behavior defined for the InputControl onto the 'onclick' event for that button. This transfer is only successful if you script against Web Designer objects as explained in the steps of this help topic. The following attempt at a fully programmatic approach would be unsuccessful:

$(".InputControl").on("lookup", function(evt, options) {
if ( condition )
$.udb.navigateToLookup("lookup page", { ... });
});

0 replies

Be the first to reply!

Reply