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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Lookup to be added on ...
Power Apps
Unanswered

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)

I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: Lookup to be added on Screen

    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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard