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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Auto Populating a Field
Power Apps
Answered

Auto Populating a Field

(0) ShareShare
ReportReport
Posted on by 240

Hello everyone,

 

Hope you are doing well!

 

Could someone possibly advise me how I can auto-populate a field within a form based on a criteria.

 

For example here, I would like 'system' to be populated with a choice if Employee id is completed with something beginning with 4 i want system to be auto populated, the same if Employee ID is populated with something beginning with E i want system to be populated with something else.

 

Appy1_0-1668530005023.png

I also have another question, it is if my form field of 'Logging Person' could be completed by the app recognising who has logged on to complete the form? and if so how to do this.

Appy1_1-1668530156139.png

 

Thank you very much!

Chris

 

 

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Appy1 

    I can't answer the first question but User().FullName to fill in the logged in user.

  • CC-19121430-0 Profile Picture
    240 on at

    Hi @WarrenBelz 
    Do you have any advice on this one?
    Thanks

    Chris

  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Appy1 ,

    Can you please provide more detail on the first question - what do you want populated in System and how are you then specifying what it is ? Also what are the Items of the Combo Box, its name and the name and type of field you are writing back to ?

  • CC-19121430-0 Profile Picture
    240 on at

    Hi @WarrenBelz,

    Thanks for your reply and apologies, I will try my best to explain exactly.

    I want to be able to populate a DataCardValue within a form (Form1).


    If EmployeeID is completed with a number beginning with 4, i know that employee ID sits within a certain system for example 'System1', if it begins with the letter E, i know that it belongs to another system 'System2'.


    I was hoping to pre-populate this to speed up the completion for whoever uses my form.

    Items within my DataCardValue are currently just the selections of system written as ["","System1","System2", "Both"].

    Appy1_0-1668696486844.png


    Many thanks for taking a look.
    Chris

  • Verified answer
    WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Appy1 ,

    DefaultSelectedItems of Combo Box DataCardValue16 (you might look at some naming protocols for your controls)

    {
     Value:
     If(
     StartsWith(
     DataCardValue1,
     "4"
     ),
     "System1,
     StartsWith(
     DataCardValue1,
     "E"
     ),
     "System2,
     . . . . . 
     )
    }

     

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard