Hi,
if you want, you can use "GetGUID" in Community Commons. This gives a numerical unique value. If you want to use text , you can add any letter characters.
https://marketplace.mendix.com/link/component/170
I would suggest using the RandomHash action the the Community Commons module. This generates a random hash perfectly to use as a random unique identifier.
https://docs.mendix.com/appstore/modules/community-commons-function-library/#39-stringutils
Good luck