PowerApps doesn't have a way to (directly) convert a number into its hexadecimal form, nor has it a direct map to the RANDBETWEEN function in Excel. But there are ways around it...
For RANDBETWEEN, you can use the RoundDown and Rand functions. If you want to have an expression equivalent to
RANDBETWEEN(low, high)
You can use the following expression in PowerApps:
low + RoundDown((high - low + 1) * Rand(), 0)
For example, to get a number between 10 and 20 (inclusive), you can use this in PowerApps:
10 + RoundDown(11 * Rand(), 0)
PowerApps does not have an equivalent to DEC2HEX - converting arbitrary numbers to hexadecimal (you can create a new item in the PowerApps ideas board for that to be added to the backlog). We can, however, use the Mid function to convert a single-digit hexadecimal number, and we can use that to create your 8-digit random hexadecimal id:
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1) &
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1) &
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1) &
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1) &
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1) &
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1) &
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1) &
Mid("0123456789ABCDEF", 1 + RoundDown(Rand() * 16, 0), 1)It works, but I certainly undestand that it's not pretty, so feel free to create the new feature request in the ideas board.