Jump to content

Van punt naar komma op het numerieke (PC-)toetsenbord.


HarryR

Recommended Posts

Posted

Als je in Excel op het nummerieke deel getallen invoert wordt de punt omgezet in een komma. FileMaker doet dat niet en je moet dus een flinke zwieper over het (PC-)toetsenbord maken om de echte komma in te voeren. Ik heb het binnen FM willen oplossen en kwam -met behulp van Tips van AVD- over o.a. de "Position"-functie tot onderstaande oplossing.

 

Velden

Bedrag_punt Tekst Geïndexeerd

Bedrag_komma Berekening Niet opgeslagen, van Uitgaven, = …

 

Berekening

Case ( Position ( Bedrag_uit_punt; "." ; 1 ; 1 ) > 0 ;

Left ( Bedrag_uit_punt ; Position ( Bedrag_uit_punt; "." ; 1 ; 1 ) -1 )

+

If ( Length ( Bedrag_uit_punt ) - Position ( Bedrag_uit_punt ; "." ; 1 ; 1 ) = 1

; ( Right ( Bedrag_uit_punt ; Length ( Bedrag_uit_punt ) - Position ( Bedrag_uit_punt ; "." ; Length ( Bedrag_uit_punt ) ; -1 )) / 10)

; ( Right ( Bedrag_uit_punt ; Length ( Bedrag_uit_punt ) - Position ( Bedrag_uit_punt ; "." ; Length ( Bedrag_uit_punt ) ; -1 )) / 100)

)

; Position ( Bedrag_uit_punt; "," ; 1 ; 1 ) > 0 ; Bedrag_uit_punt

; Position ( Bedrag_uit_punt; "." ; 1 ; 1 ) = 0 ; Bedrag_uit_punt

; Position ( Bedrag_uit_punt; "," ; 1 ; 1 ) = 0 ; Bedrag_uit_punt

)

 

De volgende omzettingen zijn het resultaat:

 

12.34 wordt 12,34

12,34 wordt 12,34

12 wordt 12,00

12. wordt 12,00

12, wordt 12,00

 

HarryR

Posted

getasnumber ( substitute ( veld ; "." ; "," )) en geef bij getalopmaak 2 decimalen aan. ev. voorloopnullen zijn weg en punt wordt komma

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...