a!localVariables( local!num: 12345, local!reversed: 0, { a!forEach( items: local!num, expression: a!localVariables( local!reversed{local!num: quotient(local!num, 10), local!reversed: ((local!reversed * 10) + local!num), local!num: mod(local!num,10)}, ) ) })
Discussion posts and replies are publicly visible
Which of the Appian functions do you want to avoid?
What is your shared code meant to do?
An example which does not use the reverse() function:
a!localVariables( local!value: 12345678, local!digits: tointeger(char(code(local!value))), tointeger( concat( index( local!digits, count(local!digits) - enumerate(count(local!digits)) ) ) ) )
Thankyou for your code!I just wanted to know is there any other way with out using count, enumerate functions to reverse a number by just using only looping functions in Appian