I'm using Appian Version 21.4 and I has a task to convert number to word, I tried to use "convertnumbertoword" function but it is not exists.
Can some one help me to achieve this task?
Discussion posts and replies are publicly visible
What exactly do you want to achieve? Convert "100" to "onehundred"?
yes
I think that does not exist in Appian. But that is a well known algorithm with many implementations. That would be a nice challenge for the community to solve.
stackoverflow.com/.../algorithm-that-converts-numeric-amount-into-english-words
This is one of my favorite challenges in Appian that I offer to people who want to solve some complex problems
There is an existing plugin that does this: community.appian.com/.../convert-number-to-word
this plugin not exists
Not sure what you mean by "this plugin not exists" - I've just followed the link that Peter Lewis provided and it does indeed exist. You have to have it installed in your environment in order to use it.
without plugin, I have solved but its for 3 digit number,but we can do it for 2 digit and more.
a!localVariables( local!num: tostring(ri!num), local!o: { "", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine" }, local!t: { "Ten", "Twenty", "Thirty", "Forty", "Fivty", "Sixty", "Sventy", "Eighty", "Ninty" }, local!ele: { "", "Eleven", "Twelve", "Thirteen", "Forteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Ninteen" }, local!digit: a!forEach( items: enumerate(len(local!num)), expression: tointeger(local!num[fv!index]) ), if( len(local!num) = 3, concat( local!o[index(local!digit, 1, {}) + 1], " ", "Hundred", " ", if( local!digit[2] = 0, {}, if( and(local!digit[2] = 1, local!digit[3] = 0), local!t[index(local!digit, 2, {})], if( local!digit[2] = 1, {}, local!t[index(local!digit, 2, {})] ) ) ), " ", if( local!digit[3] = 0, {}, if( local!digit[2] = 1, local!ele[index(local!digit, 3, {}) + 1], local!o[index(local!digit, 3, {}) + 1] ) ) ), {} ) )
please suggest some changes as well !
hi try to use
makes our live easier to support you easier