How to find the power of a number (x to the power of y) without using any Appian function like power() ?
Discussion posts and replies are publicly visible
I do not understand why you need to create a custom function however, here is the code below which will help you in achieving the required result.
you can substitute product function with an sub rule to calculate that was well.
a!localVariables( local!number: 2, local!power: 5, local!array: repeat( local!power, local!number ), reduce( fn!product, 1, local!array ) )