February 9, 2020
how can ı make a total number the end of list?
Comments
(5)
February 9, 2020
how can ı make a total number the end of list?
Newbie 1 posts
Followers: 0 people
(5)

ı must make a  salary list and the end of page(under of the list number) ı wıll show the number.like a excell.

how can ı write with coldfusıon?help please.

for exp: 1 =10

2=20

30

5 Comments
2020-02-12 11:50:33
2020-02-12 11:50:33

thank u for u helping.ı can solve it:)

Like
(1)
>
nurcanb61753314
's comment
2020-02-12 23:35:03
2020-02-12 23:35:03
>
nurcanb61753314
's comment

Good to hear. Can you mark whichever reply you may feel was the answer? That can help future readers.

Like
2020-02-11 18:01:33
2020-02-11 18:01:33

There are many ways, but perhaps the easiest solution may be to simply convert the list to an array, and then use the CF arraysum function. That could be done in one line (using BKBK’s shown salarylist list):

arraysum(listtoarray(salarylist));

I can’t tell, nurcanb, if you meant to be showing us code in your first example. It looks like maybe you put in CFML and it was lost. You may want to use the “preformatted” option in the drop-down for style while typing here.

Let us know if that code fragment I shared above helps.

Like
(2)
2020-02-11 15:40:49
2020-02-11 15:40:49

<cfset salaryList = “10,20,30,40,60”>

<cfoutput>

<cfloop from=”1″ to=”#listLen(salaryList, ‘,’)#” index=”i”>
#i# : #listGetAt(salaryList, i, ‘,’)# <br>
</cfloop>

</cfoutput>

Like
(1)
2020-02-11 15:29:28
2020-02-11 15:29:28

<cfset salaryList=”10, 20,30,40,60″>

<cfoutput>

<cfloop index=”i” from=”1″ to=”#listLen(salaryList)#” >

#i# : #listGetAt(salaryList,i,”,”)# <br>

</cfloop>

</cfoutput>

Like
(1)
Add Comment