1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Include
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
7 DEF VAR office-country-code
LIKE PhoneDetail.cCountryCode
NO-UNDO.
8 DEF VAR office-std-code
LIKE PhoneDetail.cSTDCode
NO-UNDO.
9 DEF VAR office-isd-prefix
AS CHAR NO-UNDO INITIAL "00".
10 DEF VAR office-country-name
AS CHAR NO-UNDO INITIAL "".
12 DEF VAR other-countries
AS CHAR NO-UNDO INITIAL
13 "Australia,USA, U.S.A.,UK,U.K.,United Kingdom,France,New Zealand".
15 DEF VAR street-types
AS CHAR NO-UNDO INITIAL
18 DEF VAR city-suffixes
AS CHAR NO-UNDO INITIAL
22 {inc
/ofc-set.i
"PhoneType-Priority" "phone-types"}
23 IF NOT AVAILABLE(OfficeSetting
) THEN phone-types
= "BUS,FAX,MOB,EMAL,DDI,HOME".
24 DEF VAR no-phone-types
AS INT NO-UNDO.
25 no-phone-types
= NUM-ENTRIES(phone-types
).
27 /* _UIB-CODE-BLOCK-END
*/
31 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
33 /* ******************** Preprocessor Definitions
******************** */
37 /* _UIB-PREPROCESSOR-BLOCK-END
*/
41 /* ************************ Function Prototypes
********************** */
43 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD combine-name Include
44 FUNCTION combine-name
RETURNS CHARACTER
45 ( INPUT p-title
AS CHAR, INPUT p-first
AS CHAR, INPUT p-middle
AS CHAR, INPUT p-last
AS CHAR, INPUT p-suffix
AS CHAR ) FORWARD.
47 /* _UIB-CODE-BLOCK-END
*/
50 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD get-phone-nos Include
51 FUNCTION get-phone-nos
RETURNS CHARACTER
52 ( INPUT person-code
AS INT ) FORWARD.
54 /* _UIB-CODE-BLOCK-END
*/
58 /* *********************** Procedure Settings
************************ */
60 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
61 /* Settings for
THIS-PROCEDURE
65 Add Fields to
: Neither
66 Other Settings
: INCLUDE-ONLY
68 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
70 /* ************************* Create Window
************************** */
72 &ANALYZE-SUSPEND _CREATE-WINDOW
73 /* DESIGN Window definition
(used by the UIB
)
74 CREATE WINDOW Include
ASSIGN
77 /* END WINDOW DEFINITION
*/
84 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Include
87 /* *************************** Main Block
*************************** */
89 RUN get-office-phone-defaults.
91 /* _UIB-CODE-BLOCK-END
*/
95 /* ********************** Internal Procedures
*********************** */
97 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE combine-fullname Include
98 PROCEDURE combine-fullname
:
99 /*------------------------------------------------------------------------------
101 ------------------------------------------------------------------------------*/
102 DEF INPUT PARAMETER first-name
AS CHAR NO-UNDO.
103 DEF INPUT PARAMETER last-name
AS CHAR NO-UNDO.
105 DEF OUTPUT PARAMETER full-name
AS CHAR NO-UNDO.
106 full-name
= TRIM( first-name
+ ' '
+ last-name
).
110 /* _UIB-CODE-BLOCK-END
*/
113 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE combine-phone Include
114 PROCEDURE combine-phone
:
115 /*------------------------------------------------------------------------------
117 ------------------------------------------------------------------------------*/
118 DEF INPUT PARAMETER c-country
LIKE PhoneDetail.cCountryCode
NO-UNDO.
119 DEF INPUT PARAMETER c-std
LIKE PhoneDetail.cSTDCode
NO-UNDO.
120 DEF INPUT PARAMETER phone-no
LIKE PhoneDetail.Number
NO-UNDO.
122 DEF OUTPUT PARAMETER full-phone
AS CHAR NO-UNDO.
124 DEF VAR country-part
AS CHAR NO-UNDO INITIAL "".
125 DEF VAR std-part
AS CHAR NO-UNDO INITIAL "".
127 /* If the phone number contains an @ then only put it in phone-no and return
*/
128 IF INDEX(phone-no
, "@") > 0 THEN DO:
129 full-phone
= phone-no.
133 IF c-country
<> "" AND c-country
<> ?
AND c-country
<> office-country-code
THEN
134 country-part
= "+" + c-country
+ " ".
136 IF c-std
= ?
THEN c-std
= "".
137 IF c-country
<> office-country-code
OR c-std
<> office-std-code
THEN
138 std-part
= "(" + c-std
+ ") ".
140 full-phone
= (IF country-part
<> "" THEN country-part
ELSE "")
141 + (IF std-part
<> "" THEN std-part
ELSE "")
146 /* _UIB-CODE-BLOCK-END
*/
149 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-office-phone-defaults Include
150 PROCEDURE get-office-phone-defaults
:
151 /*------------------------------------------------------------------------------
152 Purpose
: FInd the country code and std code for this office
155 ------------------------------------------------------------------------------*/
159 FIND OfficeSettings
OF Office
WHERE OfficeSettings.SetName
= "Country-Code" NO-LOCK NO-ERROR.
160 IF AVAILABLE OfficeSettings
THEN office-country-code
= OfficeSettings.SetValue.
162 FIND OfficeSettings
OF Office
WHERE OfficeSettings.SetName
= "STD-Code" NO-LOCK NO-ERROR.
163 IF AVAILABLE OfficeSettings
THEN office-std-code
= OfficeSettings.SetValue.
165 FIND OfficeSettings
OF Office
WHERE OfficeSettings.SetName
= "ISD-Prefix" NO-LOCK NO-ERROR.
166 IF AVAILABLE(OfficeSettings
) THEN office-isd-prefix
= OfficeSettings.SetValue.
168 FIND OfficeSettings
OF Office
WHERE OfficeSettings.SetName
= "Country" NO-LOCK NO-ERROR.
169 IF AVAILABLE(OfficeSettings
) THEN office-country-name
= OfficeSettings.SetValue.
173 /* _UIB-CODE-BLOCK-END
*/
176 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE split-address Include
177 PROCEDURE split-address
:
178 /*------------------------------------------------------------------------------
180 ------------------------------------------------------------------------------*/
181 DEF INPUT PARAMETER address
AS CHAR NO-UNDO.
182 DEF OUTPUT PARAMETER str-address
AS CHAR NO-UNDO.
183 DEF OUTPUT PARAMETER city
AS CHAR NO-UNDO INITIAL "".
184 DEF OUTPUT PARAMETER state
AS CHAR NO-UNDO INITIAL "".
185 DEF OUTPUT PARAMETER zip
AS CHAR NO-UNDO INITIAL "".
186 DEF OUTPUT PARAMETER country
AS CHAR NO-UNDO INITIAL "".
188 DEF VAR n
AS INT NO-UNDO.
189 DEF VAR m
AS INT NO-UNDO.
190 address
= TRIM(address
).
191 n
= NUM-ENTRIES( address
, "~n" ).
193 /* country is probably the last
, but we really have to verify it against a list
*/
194 country
= TRIM(ENTRY( n
, address
, "~n" )).
195 IF country
BEGINS "ATT" THEN DO:
196 /* an Attention
: line...
*/
197 address
= country
+ "~n" + TRIM( SUBSTRING( address
, 1, LENGTH(address
) - LENGTH(ENTRY( n
, address
, "~n" )))).
198 country
= TRIM(ENTRY( n
, address
, "~n" )).
200 IF LOOKUP( country
, other-countries
) = 0 THEN
201 country
= office-country-name.
203 address
= TRIM( SUBSTRING( address
, 1, LENGTH(address
) - LENGTH(ENTRY( n
, address
, "~n" )))).
207 /* "city, state zip" is the standard format...
*/
208 city
= TRIM(ENTRY( n
, address
, "~n" )).
209 city
= TRIM(city
, ",").
210 m
= NUM-ENTRIES( city
, " ").
212 zip
= TRIM( ENTRY( m
, city
, " ") ).
213 /* if it has a digit in it
, itis most likely to be a
"ZIP" */
214 IF (INDEX( zip
, "0") + INDEX( zip
, "1") + INDEX( zip
, "2") + INDEX( zip
, "3") + INDEX( zip
, "4") + INDEX( zip
, "5") + INDEX( zip
, "6") + INDEX( zip
, "7") + INDEX( zip
, "8") + INDEX( zip
, "9")) > 0 THEN DO:
215 city
= TRIM( SUBSTRING( city
, 1, LENGTH(city
) - LENGTH(ENTRY( m
, city
, " " )))).
216 ENTRY(n
,address
,"~n") = city.
223 /* state is probably a field after a
"," on the line
, otherwise if the last
*/
224 /* field is
<= 4 characters we will assume it's a state
*/
225 city
= TRIM(city
, ",").
226 IF INDEX( city
, ",") > 0 THEN DO:
227 state
= TRIM( SUBSTRING( city
, R-INDEX( city
, ",") + 1) ).
228 city
= TRIM( SUBSTRING( city
, 1, R-INDEX( city
, ",") - 1) ).
229 address
= TRIM( SUBSTRING( address
, 1, LENGTH(address
) - LENGTH(ENTRY( n
, address
, "~n" )))).
232 ELSE IF m
> 1 THEN DO:
233 state
= TRIM( SUBSTRING( city
, R-INDEX( city
, " ") + 1) ).
234 IF LOOKUP( TRIM(state
,"."), street-types
) > 0 THEN DO:
239 IF LENGTH(city
) < 3 OR LOOKUP( state
, city-suffixes
) > 0 THEN
241 ELSE IF LENGTH(state
) < 4 THEN
242 city
= TRIM( SUBSTRING( city
, 1, R-INDEX( city
, " ") - 1) ).
245 address
= TRIM( SUBSTRING( address
, 1, LENGTH(address
) - LENGTH(ENTRY( n
, address
, "~n" )))).
249 ELSE IF n
> 1 THEN DO:
250 address
= TRIM( SUBSTRING( address
, 1, LENGTH(address
) - LENGTH(ENTRY( n
, address
, "~n" )))).
254 str-address
= address.
258 /* _UIB-CODE-BLOCK-END
*/
261 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE split-fullname Include
262 PROCEDURE split-fullname
:
263 /*------------------------------------------------------------------------------
267 ------------------------------------------------------------------------------*/
268 DEF INPUT PARAMETER full-name
AS CHAR NO-UNDO.
269 DEF OUTPUT PARAMETER first-name
AS CHAR NO-UNDO.
270 DEF OUTPUT PARAMETER last-name
AS CHAR NO-UNDO.
272 DEF VAR next-part
AS CHAR NO-UNDO.
273 IF NUM-ENTRIES( full-name
, " " ) <= 1 THEN ASSIGN
275 last-name
= full-name.
277 first-name
= TRIM( ENTRY( 1, full-name
, " " ) ).
278 last-name
= TRIM( SUBSTR( full-name
, LENGTH( first-name
) + 1 ) ).
280 /* skip any title or so forth
*/
281 IF LOOKUP( first-name
, "Mr,Mrs,Miss,Ms,Sir,Mast,Mstr,Master") > 0 THEN DO:
283 first-name
= TRIM( ENTRY( 1, last-name
, " " ) ).
284 last-name
= TRIM( SUBSTR( last-name
, LENGTH( first-name
) + 1 ) ).
287 /* move any middle initials and stuff to be part of the first name
*/
288 next-part
= ENTRY( 1, last-name
, " ").
289 DO WHILE next-part
<> last-name
AND LENGTH(TRIM(next-part
,".")) = 1 :
290 first-name
= first-name
+ " " + next-part.
291 last-name
= TRIM( SUBSTR( last-name
, LENGTH( next-part
) + 1 ) ).
292 next-part
= ENTRY( 1, last-name
, " ").
298 /* _UIB-CODE-BLOCK-END
*/
301 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE split-name Include
302 PROCEDURE split-name
:
303 /*------------------------------------------------------------------------------
305 ------------------------------------------------------------------------------*/
306 DEF INPUT PARAMETER full-name
AS CHAR NO-UNDO.
308 DEF OUTPUT PARAMETER p-title
AS CHAR NO-UNDO INITIAL "".
309 DEF OUTPUT PARAMETER p-first
AS CHAR NO-UNDO INITIAL "".
310 DEF OUTPUT PARAMETER p-middle
AS CHAR NO-UNDO INITIAL "".
311 DEF OUTPUT PARAMETER p-last
AS CHAR NO-UNDO INITIAL "".
312 DEF OUTPUT PARAMETER p-suffix
AS CHAR NO-UNDO INITIAL "".
314 DEF VAR next-part
AS CHAR NO-UNDO.
315 IF NUM-ENTRIES( full-name
, " " ) <= 1 THEN DO:
321 p-first
= TRIM( ENTRY( 1, full-name
, " " ), " ." ).
322 p-last
= TRIM( SUBSTR( full-name
, INDEX(full-name
, " ") + 1 ) ).
324 /* extract any title
*/
325 IF LOOKUP( p-first
, "Mr,Mrs,Miss,Ms,Sir,Mast,Mstr,Master,Dr,Prof,Dame,(none)") > 0 THEN DO:
327 /* and then skip it
*/
328 p-first
= TRIM( ENTRY( 1, p-last
, " " ), "." ).
329 p-last
= TRIM( SUBSTR( p-last
, INDEX( p-last
, " " ) + 1 ) ).
332 /* extract any suffix
*/
333 IF NUM-ENTRIES( p-last
, " ") > 1 THEN DO:
334 p-suffix
= TRIM(ENTRY( NUM-ENTRIES( p-last
, " "), p-last
, " "), " .").
335 IF LOOKUP( p-suffix
, "Jr,Snr,I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII,XIII,XIV,XV,XVI,XVII,XVIII,XIX,XX") > 0 THEN
336 p-last
= TRIM( SUBSTR( p-last
, 1, R-INDEX(p-last
, " ") - 1 ) ).
341 /* split out any middle names
*/
342 IF NUM-ENTRIES( p-last
, " ") > 1 THEN DO:
343 next-part
= ENTRY( 1, p-last
, " ").
344 DO WHILE next-part
<> p-last
:
345 IF LOOKUP( next-part
, "de,van,der,mc,mac,o,di,des,en,st,te") > 0 THEN LEAVE.
346 p-middle
= p-middle
+ next-part
+ " ".
347 p-last
= TRIM( SUBSTR( p-last
, INDEX( p-last
, " ") + 1 ) ).
348 next-part
= ENTRY( 1, p-last
, " ").
350 p-middle
= TRIM(p-middle
).
355 /* _UIB-CODE-BLOCK-END
*/
358 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE split-phone Include
359 PROCEDURE split-phone
:
360 /*------------------------------------------------------------------------------
361 Purpose
: Parses
/Splits a single string phone number into
362 country code
, STD code
, phone number
365 ------------------------------------------------------------------------------*/
366 DEF INPUT PARAMETER full-phone
AS CHAR NO-UNDO.
368 DEF OUTPUT PARAMETER c-country
LIKE PhoneDetail.cCountryCode
NO-UNDO INITIAL "".
369 DEF OUTPUT PARAMETER c-std
LIKE PhoneDetail.cSTDCode
NO-UNDO INITIAL "".
370 DEF OUTPUT PARAMETER phone-no
LIKE PhoneDetail.Number
NO-UNDO INITIAL "".
372 /* Parse the phone number
! */
373 DEF VAR part-parse
AS CHAR NO-UNDO.
374 DEF VAR ch
AS CHAR NO-UNDO.
375 DEF VAR extra-phone
AS CHAR NO-UNDO.
376 DEF VAR i
AS INT NO-UNDO.
377 DEF VAR n
AS INT NO-UNDO.
379 /* If the phone number contains an @ then only put it in phone-no and return
*/
380 IF INDEX(full-phone
, "@") > 0 THEN DO:
381 phone-no
= full-phone.
385 /* always replace
"-" with
" " first for improved parsing
! */
386 full-phone
= REPLACE( TRIM(full-phone
), "-", " " ).
388 /* only parse up to the last 'phone-number' character
*/
389 n
= LENGTH(full-phone
).
391 ch
= SUBSTR(full-phone
, i
, 1).
392 IF INDEX( "0123456789+() ", ch
) = 0 THEN DO:
393 extra-phone
= SUBSTR( full-phone
, i
).
394 full-phone
= SUBSTR( full-phone
, 1, i
- 1).
399 /* assume the last two are usually the base phone number
, but if we
*/
400 /* detect sufficient structure we can override that choice
*/
401 n
= MAXIMUM( NUM-ENTRIES( full-phone
, " ") - 2, 0).
402 IF n
< 1 AND SUBSTR( full-phone
, 1, 1) = "+" THEN n
= n
+ 1.
403 IF n
< 1 AND SUBSTR( full-phone
, 1, LENGTH(office-isd-prefix
) ) = office-isd-prefix
THEN n
= n
+ 1.
404 IF n
< 2 AND INDEX( full-phone
, "(") <> 0 THEN n
= n
+ 1.
405 IF n
< 1 AND SUBSTR( full-phone
, 1, 1) = "0" THEN n
= 1.
406 n
= MINIMUM( NUM-ENTRIES( full-phone
, " "), n
).
410 part-parse
= ENTRY( i
, full-phone
, " " ).
412 IF c-country
<> "" AND c-std
<> "" THEN
413 /* no point picking country
/std information twice
*/
414 phone-no
= phone-no
+ part-parse
+ " ".
415 ELSE IF c-country
<> "" AND c-std
= "" THEN ASSIGN
416 /* since we have a country
, but no STD
, next bit must be STD
*/
418 c-std
= REPLACE( c-std
, "(", "" )
419 c-std
= REPLACE( c-std
, ")", "" ).
420 ELSE IF SUBSTR( part-parse
, 1, 1 ) = "+" THEN DO:
421 /* definitely a country
*/
422 c-country
= REPLACE( part-parse
, "+", "" ).
423 IF INDEX( c-country
, "(") <> 0 THEN DO:
424 /* also runs straight into STD without spaces
*/
425 c-std
= ENTRY( 2, c-country
, "(" ).
426 c-country
= ENTRY( 1, c-country
, "(" ).
428 /* in case it runs straight into start of phone number as well
*/
429 c-std
= REPLACE( c-std
, ")", " " ).
431 phone-no
= SUBSTR( c-std
, INDEX( c-std
, " ") + 1 ).
432 c-std
= ENTRY( 1, c-std
, " ").
435 ELSE IF c-country
= "" AND SUBSTR( part-parse
, 1, LENGTH(office-isd-prefix
) ) = office-isd-prefix
THEN DO:
436 c-country
= TRIM( REPLACE( part-parse
, office-isd-prefix
, "" ) ).
437 IF c-country
= "" THEN ASSIGN
439 part-parse
= ENTRY( i
, full-phone
, " " )
440 c-country
= part-parse.
441 IF LENGTH(c-country
) > 2 AND LOOKUP( SUBSTR( c-country
, 1, 2), "44,61,64") <> 0 THEN DO:
443 /* numbers of the style
00612 9223 5601 (quite common really
) */
444 c-std
= SUBSTR( c-country
, 3)
445 c-country
= SUBSTR( c-country
, 1, 2).
448 ELSE IF SUBSTR( part-parse
, 1, 1 ) = "(" THEN DO:
450 c-std
= REPLACE( c-std
, "(", "" ).
452 /* in case it runs straight into start of phone number as well
*/
453 c-std
= REPLACE( c-std
, ")", " " ).
455 phone-no
= SUBSTR( c-std
, INDEX( c-std
, " ") + 1 ).
456 c-std
= ENTRY( 1, c-std
, " ").
458 ELSE IF c-std
= "" AND SUBSTR( part-parse
, 1, 1 ) = "0" THEN
459 c-std
= SUBSTR( part-parse
, 2 ).
461 phone-no
= phone-no
+ part-parse
+ " ".
464 DO WHILE i
<= NUM-ENTRIES( full-phone
, " "):
465 phone-no
= phone-no
+ ENTRY( i
, full-phone
, " ") + " ".
468 c-country
= TRIM( c-country
).
469 c-std
= TRIM( c-std
).
470 phone-no
= TRIM(phone-no
)
471 + (IF extra-phone
= "" THEN "" ELSE " " + extra-phone
).
473 IF c-country
<> "" AND c-std
= ""
474 AND c-country
<> office-country-code
475 AND LOOKUP( c-country
, "65,852") = 0
477 c-std
= SUBSTRING( c-country
, LENGTH(c-country
), 1)
478 c-country
= SUBSTRING( c-country
, 1, LENGTH(c-country
) - 1).
480 IF c-country
= "" OR c-country
= office-country-code
THEN DO:
481 c-country
= office-country-code.
482 IF c-std
= "" AND LOOKUP( ENTRY( 1, phone-no
, " "), "3,4,9" ) <> 0 THEN ASSIGN
483 c-std
= ENTRY( 1, phone-no
, " ")
484 phone-no
= SUBSTR( phone-no
, 3 ).
485 ELSE IF c-std
= "" THEN
486 c-std
= office-std-code.
489 /* not even Hobart has a preceding
0 on their STD code now
*/
490 c-std
= LEFT-TRIM( c-std
, "0").
494 /* _UIB-CODE-BLOCK-END
*/
497 /* ************************ Function Implementations
***************** */
499 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION combine-name Include
500 FUNCTION combine-name
RETURNS CHARACTER
501 ( INPUT p-title
AS CHAR, INPUT p-first
AS CHAR, INPUT p-middle
AS CHAR, INPUT p-last
AS CHAR, INPUT p-suffix
AS CHAR ) :
502 /*------------------------------------------------------------------------------
504 ------------------------------------------------------------------------------*/
505 DEF VAR full-name
AS CHAR NO-UNDO.
507 IF p-title
= ?
THEN p-title
= "".
508 IF p-first
= ?
THEN p-first
= "".
509 IF p-middle
= ?
THEN p-middle
= "".
510 IF p-last
= ?
THEN p-last
= "".
511 IF p-suffix
= ?
THEN p-suffix
= "".
513 full-name
= TRIM( p-title
) + ' '
+ TRIM( p-first
).
514 full-name
= TRIM( full-name
) + ' '
+ TRIM( p-middle
).
515 full-name
= TRIM( full-name
) + ' '
+ TRIM( p-last
).
516 full-name
= TRIM(TRIM( full-name
) + ' '
+ TRIM( p-suffix
)).
522 /* _UIB-CODE-BLOCK-END
*/
525 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION get-phone-nos Include
526 FUNCTION get-phone-nos
RETURNS CHARACTER
527 ( INPUT person-code
AS INT ) :
528 /*------------------------------------------------------------------------------
531 ------------------------------------------------------------------------------*/
532 DEF VAR no-found
AS INT NO-UNDO INITIAL 0.
533 DEF VAR phone-nos
AS CHAR NO-UNDO INITIAL "".
534 DEF VAR this-phone
AS CHAR NO-UNDO INITIAL "".
536 DEF VAR this-type
AS CHAR NO-UNDO.
537 DEF VAR i
AS INT NO-UNDO.
538 DO i
= 1 TO no-phone-types
:
539 this-type
= ENTRY( i
, phone-types
).
540 FIND PhoneDetail
WHERE PhoneDetail.PersonCode
= person-code
541 AND PhoneDetail.PhoneType
= this-type
NO-LOCK NO-ERROR.
542 IF AVAILABLE(PhoneDetail
) THEN DO:
543 no-found
= no-found
+ 1.
544 RUN combine-phone
( PhoneDetail.cCountryCode
, PhoneDetail.cSTDCode
, PhoneDetail.Number
, OUTPUT this-phone
).
545 phone-nos
= phone-nos
+ this-type
+ ":" + this-phone
+ ", ".
549 phone-nos
= TRIM(phone-nos
, ", ").
555 /* _UIB-CODE-BLOCK-END
*/