Show / Hide Table of Contents

    LookupValue Procedure

    Codeunit RecRef Functions

    Shows a lookup page for a selected field in a given table.

    If the field specified by FieldNo has a table relation to a table that has a lookup page, this will be shown.

    If the field is an option or enum, a lookup for enum values will be shown.

    Signature

    LookupValue(var RecRef: RecordRef; FieldNo: Integer; var FieldValue: Text) : Boolean
    

    Parameters

    var RecRef RecordRef

    The table that contains FieldNo, populated with any values that are needed to determine the table relation.

    FieldNo Integer

    The number of the field in RecRef that has one or several table relations, or that is of the Option or Enum data types.

    If the field has conditional table relations, then RecRef must be populated with the values that are needed to identify the table relation.

    var FieldValue Text

    Returns the selected value, formatted as XML.

    If this parameter has an input value, this will be used to try to position the selected record when the page list is opened.

    The input value must also be formatted as XML, with the help of Format(Value, 0, 9).

    Returns

    Boolean

    This function returns true if the user has selected a record and FieldValue contains the value of the related field. false is returned if the user cancels the lookup, if no field relation could be found for the field specified by FieldNo or if the field is not of the Option or Enum data types.

    This documentation is generated from Smart Toolbox v27.0

    Back to top Copyright © 2020 SmartApps
    Generated by DocFX