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 / Lookup to be added on ...
Power Apps
Answered

Lookup to be added on Screen

(0) ShareShare
ReportReport
Posted on by 499

Hi All, I am new to this Power Platform. As part of exploring the Power Apps, I started off creating some basic apps. While doing that, I was trying to create a contact from App and want to show the account lookup on the screen. I am not using any form or gallery, instead I am using blank screen and adde all my required feilds. I am able to create a new contact in CDS (D365) without Account, but I want to add Account to it and if the required account is not avaialble from the lookup, it should create an account and map it to that contat.

 

If(
!(PasswordTextInput.Text = ReEnterPasswordTextInput.Text),
Notify(
"Passwords not matching",
NotificationType.Error
),
Patch(
Contacts,
{'First Name':FirstNameTextInput.Text,
'Last Name':LastNameTextInput.Text,
Password:PasswordTextInput.Text,
Email:EmailTextInput.Text,
'Business Phone':PhoneNumberTextInput.Text }
)
); Navigate(SuccessScreen,None)

LookupScreenshot.PNG
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @krishnags,

    Could you please share a bit more about your scenario?

    Do you want to list the available accounts from the Accounts Entity of your CDS within your app?

    If you want to list the available accounts from the Accounts Entity of your CDS within your app, I think the Combo Box control could achieve your needs. I have made a test on my side, please take a try with the following workaround:9.JPG

     

    8.JPG

    Within your app, add your Accounts Entity as a data source, then add a Combo Box control within the screen of your app, set the Items property of the Combo Box control to following:

    Accounts

    Within the Right Pop-Up panel, set the Primary text field and SearchField both to FullName column.

    Please check the attached GIF screenshot for more details:

     

    I assume that you have created a Account Name column (Text Type column) in your Contacts Entity already, please modify your formula as below:

    If(
     !(PasswordTextInput.Text = ReEnterPasswordTextInput.Text),
     Notify("Passwords not matching", NotificationType.Error),
     Patch(
     Contacts,
    Defaults(Contacts), /* <- Modify formula here */ {
    'First Name':FirstNameTextInput.Text, 'Last Name':LastNameTextInput.Text, Password: PasswordTextInput.Text, Email: EmailTextInput.Text, 'Business Phone': PhoneNumberTextInput.Text,
    AccountName: ComboBox1.Selected.FullName /* <- Add formula here , ComboxBox1 represents the ComboBox control in your app*/
    } ) );
    Navigate(SuccessScreen,None)

    More details about the Patch function, please check the following article:

    Patch function

     

    Best regards,

    Kris

    Test1.gif

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
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard