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
we can write our own logic but in case if value is : 968546729, what do you expect in output?
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") ) )