Field-Map Scripting

4.15.10 Value

Value property


Prototype:

property Value [Index :integer] :variant;

Description:

Returns the value of the input element at index position.

Syntax:


variable := vDlg.Value[Index];



Part

Description


variable

A variable declared as a variant


vDlg

A reference to an instance of a TValueDialogWrapper  


Index

Variable declared as integer that represents the position of the element on the dialog window

Return value:

Value of the input element at index position


See also:

Create, Free, AddHeader, AddInteger, AddFloeat, AddString, AddLookuplist, AddDate, InputValues, Value, ValueByLabel


Example:

var 
  vdlg :TValueDialogWrapper;
  lkpSpecies,lkpDeadTree:TTableWrapper;
  choice : variant; 
begin
  lkpSpecies:=Trees.GetLookupTable('Species');
  lkpDeadTree:=Trees.GetLookupTable('DeadTree');
  
  vdlg:=TValueDialogWrapper.Create;
  try
    vdlg.AddLookupList('Species',lkpSpecies,'ID','Value1',null);
    vdlg.AddLookupList('Dead tree',lkpDeadTree,'ID','Value1',null);
    if vdlg.InputValues('Select values') then begin
      // do something
      ShowMessage(format('Selected species value: %s',[vdlg.ValueByLabel('Species')]));
      ShowMessage(format('Selected dead tree value: %s',[vdlg.Value[1]]));
    end;
   finally
     vdlg.Free;
     lkpDeadTree.Free;
     lkpSpecies.Free;
   end;
end.