web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / User name generator
Power Apps
Unanswered

User name generator

(0) ShareShare
ReportReport
Posted on by 8

Hi all. im trying to build a powerapps user registration form, where i have a "Edit form" that contains these "dataCard":

Firstname_Datacard

Lastname_Datacard

Username_Datacard

(and some more)

the idea is that the Username_Datacard generates a 6 character long username based on 3 words from Firstame_Datacard and 3 from Lastname_Datacard. where first letter from the Firstname_Datacard is statics

eg. Jack Douglas -> Jckdlas 

and does a validation to make sure that username is not already used/listed.

 

Any idea if this is doable via powerapps? 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @Hanzo007 ,

    Jack Douglas would actually be Jaclas and the easiest way to make it unique (assuming you are using SharePoint here - you did not specify your data source) is to Enforce Unique Values in the SharePoint list settings.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Hanzo007 Profile Picture
    8 on at

    Hi @WarrenBelz sorry, yes the source is Sharepoint list. the Enforce Unique Values is already enabled. and from what i understand, this check on works if you add the value manually and "hit" save not before. . but what im seeking help on (dont know if its doable), is if Powerapps, can generate values based on those two "input boxes" and calculated a "free" username before populate it to the username box and then save the form data

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @Hanzo007 ,

    Getting a bit complex here - what do you want to use for the unique name if it already exists ? You can check with

    !IsBlank(
     LookUp(
     SPListName,
     UserName = YourUserNameControl.Whatever
     ).ID
    )

    You would then have to give Power Apps an alternate pattern to use.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Hanzo007 Profile Picture
    8 on at

    Hi again @WarrenBelz , The idea was that it generated a username and did a lookup towards the SPList in the background before "presenting" in the Username_Datacard or even better few option to select from via a drop-down menu.

     

    but do you know if powerapps do supports generating a username like descripted?  

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @Hanzo007 ,

    You need to specify what the name would be (maybe add a 1 to the end)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Hanzo007 Profile Picture
    8 on at

    Hi @WarrenBelz, i already did that, by using the logic; 3 char from Firstname and 3 char from Lastname.

    Any idea on if this is doable? anyone else want to chip in? 🙂

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @Hanzo007 ,

    You are missing the point - this is a logic rather than a coding issue. You have a name you have generated and now want to allow for it already existing. I have given you the formula to check if it exists, what I am asking now is what you want to do to generate an alternate name if it is duplicated - as per your specifications

    Powerapps, can generate values based on those two "input boxes" and calculated a "free" username before populate it to the username box and then save the form data

    So do you simply want to add something to the end or generate something completely different?

  • Hanzo007 Profile Picture
    8 on at

    Hi @WarrenBelz  sorry my bad i have totally misunderstood your previous post. yes a number could work. if we even get there, as there are "millions" of combinations.

     

    what im have trouble with is, what function to use to achieve it. perhaps a Left, Mid and Right? and trim?  

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @Hanzo007 ,

    If you want a random number between 1 and 100

    Text(
     RoundUp(
     (Rand() * 100),
     0
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @Hanzo007 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard