How to create an alphanumeric string type id that changes every time a new instance of the object is created

I need to create a microflow that generates an alphanumeric string as an identifier, for example, the first time it is k001 and this is autoincremented sequentially and the second time it returns k002 and so on how many times it is executed, any advice or suggestion on how I could do it    
1 answers

Dear Carlos Danilo Angarita Garcia,


Let's consider that you have created the first object with k001 in an attribute, now use a before commit microflow and retrieve the first object using attribute set to descending order. Now change the attribute of new object using 'k' + toString(parseInteger(replace($retrivedobject, 'k', '')) + 1).


Hope my answer helps, reach me out for any queries.