Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 440

Getting Started with LiveCode - Complete Beginners • Number Format (decimal,comma)

$
0
0
hi everyone,

Good day.

is there a simple way to format a number ex 279495 = 279,495.00? and when the user type a number ex 100 it will format automatic into 100.00
formatNumber.png

CODE:

on mouseUp   GetTheTotalGallonsend mouseUpcommand  GetTheTotalGallons   put the dgText of grp "SbCustOrderList" of stack "SBCustOrdersList" into tData   set itemDelimiter to tab      repeat for each line tLine in tData      if item 3 of tLine is a number  then         add item 3 of tLine to tSumTotalGallon      end if            if item 6 of tLine is a number  then         add item 6 of tLine to tSumTotalAmnt      end if         end repeat   put tSumTotalGallon into fld "TotalGallons"   put tSumTotalAmnt into fld "GrndTotalAmt"end GetTheTotalGallons

thanks for the help in advance

Statistics: Posted by lemodizon — Wed Jul 10, 2024 11:35 am



Viewing all articles
Browse latest Browse all 440

Trending Articles