Hi Friends,
My Requirement is to print no.s 1 to 100 without using enumerate function.If you could help me logic that would be a great help
Thanks in Advance.
Divya
Discussion posts and replies are publicly visible
Why can you not use enumerate?
Hey Divya - Let me know if the below code helps.
a!localVariables( local!input: repeat( 100, " " ), a!forEach( items: local!input, expression: tointeger( substitute( fv!item, " ", fv!index ) ) ) )
Hi Divya,
Here is my answer where you can have random starting and random ending number. You can use my code as a individual function in Appian.
a!localVariables( local!count:ri!endingNum-ri!startingNum+1, local!data:repeat(local!count,ri!startingNum), local!result:a!forEach( items: local!data, expression: tointeger( ri!startingNum+fv!index-1 ) ), { local!result })
----
where ri!startingNum = 1,
ri!endingNum =100,
output -> list of integer numbers as you expected.