Ga naar inhoud
  • 0

Telefoonnummer notatie


Bob

Vraag

Hallo Filemakkers,

Ik post vandaag als newbie :D

Ik zit met het volgende probleem, ik heb een telefoonnummer invoerveld aangemaakt met automatische invoer berekening voor de juiste telefoonnotatie.

Echter krijg ik het niet voor elkaar om onderscheid te maken tussen de 3cijferige netnummers en de viercijfige netnummer. Dus bijv. (012) 123 23 34 of (01234) 123 456.

De eerste heb ik wel voor elkaar gekregen met behulp van deze berekening:

Let ( [

input = GetAsText (  Filter ( telefoonnummer ; "0123456789" ) ) ;

chk = Length ( input ) = 10

];

 

Case

(

not chk ; TextColor ( telefoonnummer ; RGB ( 220 ; 0 ; 0 ) ) ; //geen tiencijferig nummer, druk af in rood

"(" & Left ( input ; 3 ) &

") " &

Middle ( input ; 4 ; 3 ) &

" " &

Middle ( input ; 7 ; 2 ) &

" " &

Middle ( input ; 9 ; 2 )

))

 

maar ik krijg het dus niet voor elkaar om in een berekening die combinatie te maken.

Kan iemand mij opweg helpen aub.

Link naar reactie

3 antwoorden op deze vraag

Aanbevolen berichten

  • 0

Hallo

 

hierbij mijn oplossing voor Belgische telefoonnummers en zones

zone antwerpen: 03/123.12.12

zone brugge: 050/12.12.12

gsm: 0475/12.12.12

en zone Luik 04/123.12.12

enz....

 

 

Let  (   [

input =  GetAsText  (  Filter  ( tel ; "0123456789"  ) )  ;

chk9 = Length ( input ) = 9 ; 

chk10 = Length ( input ) = 10

];

 

Case 

( input  = "000000000" ; TextColor ( "000/000.000" ; RGB (0 ; 0 ; 0 ));

(not chk9 and not chk10) or ( Left (input ; 2 )  ≠  "02" and Left (input ; 2)  ≠  "03"  and Left (input; 2 )  ≠  "04" and Left (input ; 2)  ≠  "09" and Left (input ; 2 )  ≠  "01" and Left (input ; 2)  ≠  "05" and Left (input; 2 )  ≠  "06" and Left (input ; 2)  ≠  "07" and Left (input ; 2)  ≠  "08") ; TextColor ( tel ; RGB ( 220 ; 0 ; 0 ) ) ;

 

(Left (input ; 2 ) = "02" or Left (input ; 2) = "03" or Left (input; 3 ) = "042" or Left (input; 3 ) = "043" or Left (input ; 2) = "09") and (Land = "") and chk9 ;

TextColor (Left ( input  ; 2 ) & "/" &  Middle ( input  ;  3 ;   3 ) & "." & Middle ( input  ;  6 ;   2 ) & "." & Middle ( input  ;  8  ;  2 ) ; RGB (0;0;0));

 

(Left (input ; 2 ) = "01" or Left (input ; 2) = "05" or Left (input; 2 ) = "06" or Left (input ; 2) = "07" or Left (input ; 2) = "08") and (Land = "") and chk9;

TextColor (Left ( input  ; 3 ) & "/" &  Middle ( input  ;  4 ;   2 ) & "." & Middle ( input  ;  6 ;   2 ) & "." & Middle ( input  ;  8  ;  2 ) ; RGB (0 ; 0 ; 0 ));

 

 

(not chk10 or ( Left ( input ; 3 )  ≠  "047" and Left ( input ; 3 )   ≠   "048" and Left ( input ; 3 )  ≠  "049" ) ); TextColor ( tel ; RGB ( 220 ; 0 ; 0 ) );

( Left ( input ; 3 )  =  "047" or Left ( input ; 3 )   =   "048" or Left ( input ; 3 )  =   "049" ) and (Land = "") and chk10 ;

TextColor (Left ( input  ; 4 ) & "/" &  Middle ( input  ;  5 ;   2 ) & "." & Middle ( input  ;  7 ;   2 ) & "." & Middle ( input  ;  9  ;  2 ) ; RGB (0; 0; 0));

TextColor ("000 000 000" ; RGB (225 ; 0 ; 0 ))

 

)

)

Link naar reactie

Doe mee aan dit gesprek

Je kunt dit nu plaatsen en later registreren. Indien je reeds een account hebt, log dan nu in om het bericht te plaatsen met je account.

Gast
Beantwoord deze vraag...

×   Geplakt als verrijkte tekst.   Plak in plaats daarvan als platte tekst

  Er zijn maximaal 75 emoji toegestaan.

×   Je link werd automatisch ingevoegd.   Tonen als normale link

×   Je vorige inhoud werd hersteld.   Leeg de tekstverwerker

×   Je kunt afbeeldingen niet direct plakken. Upload of voeg afbeeldingen vanaf een URL in

×
×
  • Nieuwe aanmaken...