executeLookup

Method Type

JavaScript

Description

Does a lookup.

  • The lookup must exist under the same process group for the application where the eForm runs.
  • The result is returned as an array of objects that match the lookup.

Parameters

The method input is an object with these parameters, and a callback function.

Field Name Definition

lookupName

Function:
Specifies the lookup for the form control to change.
Type
string
Accepted Values:
The lookup name of your form control.

lookupType

Function:
Specifies the lookup type for the form control to change.
Type
string
Accepted Values:
  • eFormHelper.constants.lookuptype.multicolumn - Changes a multiple column lookup.
  • eFormHelper.constants.lookuptype.namevalue - Changes a name/value lookup.

Output

A result object that gives the status, data, and error details.

Field Name Definition

isSuccess

Function:
Specifies whether a pop-up shows when the method completes successfully.
Type
bool
Accepted Values:
  • True - The method was successful.
  • False - The method was not successful.

data

Function:
Holds a lookup result.

error

Function:
Specifies an error message if an error occurs.
Type
string
Accepted Values:
The contents of an error message.

Example

var options = {};
options.lookupName = 'GetUserDetails';
options.lookupType = eFormHelper.constants.lookuptype.multicolumn; ('user\\lookupmulticolumn')
// multicolumn:eFormHelper.constants.lookuptype.multicolumn;
// namevalue:eFormHelper.constants.lookuptype.namevalue;
eFormHelper.executeLookup(options, function (result) 
  {
  if (result.isSuccess) 
    {
    console.log(result.data); //logs the data which holds the lookup result
    }
  else 
    {
    console.log(result.error); // logs the hold exception object 
    }    
});

Good to Know

  • Advanced Examples

    For more advanced or complex examples or specific information about how to solve a specific business problem or use case, AgilePoint recommends these resources:

    • AgilePoint Community Forums - An AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
    • Video Portal - Video walkthroughs for a range of simple and advanced tasks in AgilePoint NX.
    • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
    • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.

Supported Versions

AgilePoint NX v6.0 and higher