PdcApplication.ChooseRecord

From External Bemet Wiki
Revision as of 10:47, 21 May 2012 by Mike (talk | contribs)
Jump to navigation Jump to search

Declaration

ChooseRecord(pKind as long,Default as String,Filter as String) as String

Description

Returns a choosen record of the supplied table

Notes

The stated table is shown in PdC for the user to select the required record. The returned value is the ID field value of the selected record.

pKind The pKind value (see list below) representing the required table (mandatory).
Default The identifying value of the default record (optional).
Filter The filter applied to restrict the number of rows for the user.(optional)
Result The identifying value of the selected record.

Code example

This code example lets the user select a material, starting with '100', in the materialtable. The returned value is its number.

dim strMatNr

  strMatNr = pdc.ChooseRecord(2, "", "(LEFT(UPPER(LM_MATN),3) = '100')")

    if Trim(strMatNr) <> "" then
    msgbox "You have selected material: " & strMatNr & 
  else
    msgbox "No material selected."
  end if

Constants

The following pKinds are available:

0 Relations table 3 Payment conditions 4 VAT table (BTW) 5 Calculation table 6 Certificate table 7 CNC program table 8 Contacts table 11 Subcontracting table 14 Additional costs table 17 Invoice header table 18 Invoice line table 19 Error code table 22 Purchase line table 24 Purchase invoice table 26 Internal operations table 28 Cost type table (kostensoorten) 29 Country code table 30 Layout table 32 Delivery date changecodes table 35 Personnel table 36 Material table (all) 37 Materialkind table 38 Material group table 39 Tools table 40 Timelines to process table 41 Production norms table 42 Project header table 43 Project status table 46 Deliverynote lines table 47 Planning resources table 52 Script table 53 Calculation status table 54 Standard descriptions table 55 Orders 'to plan' table 60 Relation classes table 61 Accountview administration table 62 Location table 64 Operations in calculation table 65 Materials in calculation table 67 Userfield 5 values table 68 Terms of payment table 69 Shipping instructions table 70 Stock mutation history table 73 Currency table 74 PDC Users table 75 Project lines table 76 Default roles table 77 Delivery note headers table 82 Terms of delivery table 83 CBS number table 84 Bank account numbers table 86 Language code table 89 Clock reasons table 96 Certificate table 98 Stock mutation codes table 100 Userfields table 106 Purchase order header table 107 Purchase request header table 108 Product reports table 109 Serial numbers 111 Purchase invoice lines 112 DeliveryNotesAll (4.0) 113 DeliveryNoteLinesAlls (4.0) 114 CalculationsAll (4.0)

Availability

Available since April 2005 (From version 3.6).