Hi, Is there an existing function on Appian to convert this value for example 100,000 to 100k? this goes on by million or billion. Thanks2
Discussion posts and replies are publicly visible
AFAIK there isn't such function , Check is there any plug ins available (I don't think there is any Plugins too). Can we know why do wanna convert , So we can think of other ways
currently doing a columnChartField() and would like shorten the value on the amount to Thousand/Million symbol on the a!measure formatValue as well as the Y-axis
Then Why don't you divide the value with million and just Add "in Millions" Tag.
Hello Yamaken,There is no such function to perform your requirement. We have currency function to get the format from normal text/numbers to ISO formats but not from ISO format to the way you are expecting. May be you can create a generic rule and use along your application instead as it is a very minor and easy to handle requirement.
we can write our own logic but in case if value is : 968546729, what do you expect in output?
Can't we use round function and use keywords like "Nearly" , "Over"
I think the person who asked this question should tell what is the Maximum length of digits he is expecting to be processed or formatted. To answer your question he is asking just to display the value in thousands is what I understand. If its the above case then he can change it to thousands and use fixed and concat the K
yes, by question phrase OP said value can be million or billion, assuming it can go more than number(integer) range in Appian which can be an issue, if it is below than that Yamaken ->
/*you can use round funcction to display values after decimal for ex bellow cade will give you 100K for 100000, and 100.543K for 100543 to round up the result by 1 or 2 decimal you can use round function to get desired result e.g - 100.5k*/ if( or(len(ri!number) < 4, len(ri!number) > 10), ri!number, a!match( value: len(ri!number), whenTrue: fv!value < 7, then: concat(ri!number / 1000, "k"), whenTrue: fv!value < 10, then: concat(ri!number / 1000000, "M"), default: concat(ri!number / 1000000000, "B") ) )
yes we can but it is not clear from OP.
You can use this customized rule that I created for myself
a!match( value: ri!num, whenTrue: and(len(fv!value)>=4,len(fv!value)<=6 ), then: concat(round(fv!value/1000,2),"k"), whenTrue: and(len(fv!value)>=6,len(fv!value)<=9 ), then:concat(round(fv!value/1000000,2),"m"), whenTrue:len(fv!value)<=9, then: concat(round(fv!value/10000000,2),"b"), default: fv!value )