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 / 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:
I have the same question (0)
  • 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
    153,073 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
    153,073 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

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard