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 / Fill a Form as yoursel...
Power Apps
Answered

Fill a Form as yourself or another person

(0) ShareShare
ReportReport
Posted on by 48

Hello, 

 

I have a form with the following fields, Entity, Ext, Name and Line Manager.

 

I want my landing page to have two buttons "self" and "others" such that when the user selects "self" meaning he/she is filling for themselves, the fields above are automatically populated.

If he/she selects "others", The Name Field should be left to be manually inputed with the "other" person's name but all other fields are populated with the details of the "other" person 

 

Kindly assist. 
Please Help

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Khole ,

     

    Could you please share more details about your scenario? How will you know to whom it will point when pressing the "others" button (since you will need the details of the others person auto-populated into the form)?

     

    Generally speaking, OnSelect of both buttons you can set variable in the Navigate function:

    Navigate(FormScreen, ScreenTransition.Fade, {Who: "Self")
    Navigate(FormScreen, ScreenTransition.Fade, {Who: "Others")

     

    On the form screen, I assume it is always a New mode Edit form, so you can set the properties of Default (for Text Inputs control) or DefaultSelectedItems (for Combo box or Dropdown controls) based on the condition checking result:

    Name:

    If(Who = "Self", User().DisplayName, Blank())

    Other controls are similar to this.

     

    Hope this helps.

     

    Best regards,

  • Cole97 Profile Picture
    2 on at

    Hello @v-jefferni

     

    So when the others button is selected, the fields would not be auto populated until the name is filled manually.

    (Others are also from the same organization so their details are also in the AD)

     

    Also, Using the formulas above, does it make the form populate the details automatically?

     

    Your Reply would be appreciated

  • Khole Profile Picture
    48 on at

    Hello @v-jefferni

     

    So when the others button is selected, the fields would not be auto populated until the name is filled manually.

    (Others are also from the same organization so their details are also in the AD)

     

    Also, Using the formulas above, does it make the form populate the details automatically?

     

    Your Reply would be appreciated

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Khole ,

     

    As I said in my previous reply, you will need to set all the other controls' Default or DefaultSelectedItems based on the control within all the Data Cards. The question is still: what's the display mode of the form? If it's a new form, why will you like to populate the form with existing information in the list? 

     

    Best regards,

     

  • Khole Profile Picture
    48 on at

    Hello @v-jefferni ,

     

    Yes the form is on New Mode. I'm not trying to populate the Data from a new list, but from the active directory.

     If you are referring to the 'others' button, I want Details of the name I fill in Fullname to be fetched from the Active Directory.

     

    Best Regards.

     

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Khole ,

     

    Understood. So you need to modify Default property of other Text Input boxes (DataCardValue) to:

    If(
     Who = "Self", 
     Office365Users.MyProfileV2().OtherColumn, 
     If(
     !IsBlank(TextInput2.Text),
     First(Office365Users.SearchUserV2({searchTerm:NameDataCardValue.Text}).value).OtherColumn
     )
    )

     

    Best regards,

  • Khole Profile Picture
    48 on at

    Hello @v-jefferni ,

     

    I thank you for your patience and timely responses. I only have some other questions.

     

    The formula above is for the other input boxes for the 'others" button right?

    Also, most of the input boxes I use are dropdowns, does that affect the formulas you have provided.

    Do I need to duplicate forms so that each button (self or others) lead to differnrt forms?

     

    Your Response is highly required.

    Regards

  • Khole Profile Picture
    48 on at

    Also, what should take the place of

    TextInput2.Text and {searchTerm:NameDataCardValue.Text}
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Khole ,

     

    One form is enough. As I said previously, you can use the variable set OnSelect of the two buttons. For Combo boxes, the difference is you will need to use a LookUp function in DefaultSelectedItems property to get corresponding values from respective Items property which are their data sources.

    If(
     Who = "Self", 
     LookUp(Items, SomeColumn = Office365Users.MyProfileV2().SomeColumn),
     If(
     !IsEmpty(Combobox.Selected),
     LookUp(
     Items,
     SomeColumn = First(Office365Users.SearchUserV2({searchTerm:NameDataCardValue.Text}).value).SomeColumn
     )
     )
    )

     

    Best regards,

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Khole ,

     

    Both of them should be the text input box control name of the Name field.

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard