PdcApplication.ChooseRecord: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability =="
 
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Declaration ==
== Declaration ==
 
ChooseRecord(pKind as long,Default as String,Filter as String) as String


== Description ==
== Description ==
 
Returns the selected record of the supplied table


== Notes ==
== 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).<br />
Default The identifying value of the default record (optional).<br />
Filter The filter applied to restrict the number of rows for the user.(optional)<br />
Result The identifying value of the selected record.


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


<source lang="vb">
dim strMatNr


<source lang="vb">
  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
</source>
</source>
== Constants ==
The following pKinds are available:
0 Relations table<br />
3 Payment conditions<br />
4 VAT table (BTW)<br />
5 Calculation table<br />
6 Certificate table<br />
7 CNC program table<br />
8 Contacts table<br />
11 Subcontracting table<br />
14 Additional costs table<br />
17 Invoice header table<br />
18 Invoice line table<br />
19 Error code table<br />
22 Purchase line table<br />
24 Purchase invoice table : Shows all purchase invoice  LINES, returns PIH_HEADER.PIH_BOOKNUMBER <br />
26 Internal operations table<br />
28 Cost type table (kostensoorten)<br />
29 Country code table<br />
30 Layout table<br />
32 Delivery date changecodes table<br />
35 Personnel table: is equal to 97, only showing the non confidential data out of VIEW_MAN<br />
36 Material table (all)<br />
37 Materialkind table<br />
38 Material group table<br />
39 Tools table<br />
40 Timelines to process table<br />
41 Production norms table<br />
42 Project header table (only current)<br />
43 Project status table<br />
46 Deliverynote lines table<br />
47 Planning resources table<br />
52 Script table<br />
53 Calculation status table<br />
54 Standard descriptions table<br />
55 Orders 'to plan' table<br />
60 Relation classes table<br />
61 Accountview administration table<br />
62 Location table<br />
64 Operations in calculation table<br />
65 Materials in calculation table<br />
67 Userfield 5 values table<br />
68 Terms of payment table<br />
69 Shipping instructions table<br />
70 Stock mutation history table<br />
73 Currency table<br />
74 PDC Users table<br />
75 Project lines table<br />
76 Default roles table<br />
77 Delivery note headers table<br />
82 Terms of delivery table<br />
83 CBS number table<br />
84 Bank account numbers table<br />
86 Language code table<br />
89 Clock reasons table<br />
96 Certificate table<br />
98 Stock mutation codes table<br />
100 Userfields table<br />
106 Purchase order header table<br />
107 Purchase request header table<br />
108 Product reports table<br />
109 Serial numbers <br />
111 Purchase invoice lines : Shows all purchase invoice  LINES, returns the PIL_LINE.ID <br />
112 DeliveryNotesAll (4.0) <br />
113 DeliveryNoteLinesAlls (4.0)<br />
114 CalculationsAll (4.0)<br />
115    Free Userfields (UF_FIELDDEF) <br/>
117    Predefined text blocks: To be used in all memo's in PdC<br />
121    Calculation status table (4.3)<br />
123    Standard routes table<br />
131    Project header table<br />
166    TimeTypes table (5.3)<br />


== Availability ==
== Availability ==
Available since April 2005 (Version 3.6 onwards).

Latest revision as of 18:34, 10 February 2020

Declaration

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

Description

Returns the selected 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 : Shows all purchase invoice LINES, returns PIH_HEADER.PIH_BOOKNUMBER
26 Internal operations table
28 Cost type table (kostensoorten)
29 Country code table
30 Layout table
32 Delivery date changecodes table
35 Personnel table: is equal to 97, only showing the non confidential data out of VIEW_MAN
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 (only current)
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 : Shows all purchase invoice LINES, returns the PIL_LINE.ID
112 DeliveryNotesAll (4.0)
113 DeliveryNoteLinesAlls (4.0)
114 CalculationsAll (4.0)
115 Free Userfields (UF_FIELDDEF)
117 Predefined text blocks: To be used in all memo's in PdC
121 Calculation status table (4.3)
123 Standard routes table
131 Project header table
166 TimeTypes table (5.3)

Availability

Available since April 2005 (Version 3.6 onwards).