cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Canvas app - CDS contact edit form, search and set Company name lookup value

Hi,

 

I have got a simple canvas app for contacts using CDS connector. The gallery contains the list of contacts. I want to be able to set the company name on the contact form in "edit form". Company name is a customer type lookup.  How can i show a list of companies to user in the company name field therefore being able to select one?

 

Do i have to build some kind of search functionality on the field as when the user is typing it should go ahead and look for all the accounts fully/partially matching with Search. Any suggestions/blog link please?

 

 

I am showing company name on gallery and display form using following blog.

https://www.magnetismsolutions.com/blog/colinmaitland/2019/09/17/how-to-display-the-parent-customer-...

 

Regards

Umer

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Canvas app - CDS contact edit form, search and set Company name lookup value

Hi @UmerJaved ,

Do you want to display the 'Company Name' list options within your Contact Edit form?

 

If you want to display the 'Company Name' list options within your Contact Edit form, I afraid that there is no way to achieve your needs in PowerApps currently.

The 'Company Name' field in Contact Entity would be rendered as a Read-Only field in Edit form of canvas app, you could not display the available options from the 'Company Name' field in your Contact Edit form.

2.JPG

 

 

Actually, the 'Company Name' is a Polymorphic lookup field, which could reference a record from Accounts Entity or Contacts Entity. Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-references#show-the-fields...

 

As an alternative solution, you could consider add a ComboBox inside the 'Company Name' field data card manually, then connect the ComboBox to your Accounts Entity, then bind the ComboBox to the 'Company Name' field.

 

I have made a test on my side, please consider take a try with the following workaround:

3.JPG

 

4.JPG

 

5.JPG

1. Add Accounts Entity as data source in your app.

2. Enable "Company Name" field data card in your Edit form, then unlock this data card.

3. Add a ComboBox and a Label inside the "Company Name" field data card. Set the Text property of Label to following:

 

"Company Name"

 

set the Items property of the ComboBox1 to following:

 

[@Accounts]

 

then specify the 'Full Name' field as display column value within your ComboBox1 (as above screenshot).

Set the SelectMultiple property of the ComboBox1 to following:

false

Set the DefaultSelectedItems property of this ComboBox1 to following:

 

AsType(ThisItem.'Company Name', [@Accounts])

 

 

Set the Update property of the "Company Name" field data card in your Edit form to following formula:

 

ComboBox1.Selected

 

 

Please check the following GIF screenshot for more details:

Test1.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Canvas app - CDS contact edit form, search and set Company name lookup value

Hi @UmerJaved ,

Do you want to display the 'Company Name' list options within your Contact Edit form?

 

If you want to display the 'Company Name' list options within your Contact Edit form, I afraid that there is no way to achieve your needs in PowerApps currently.

The 'Company Name' field in Contact Entity would be rendered as a Read-Only field in Edit form of canvas app, you could not display the available options from the 'Company Name' field in your Contact Edit form.

2.JPG

 

 

Actually, the 'Company Name' is a Polymorphic lookup field, which could reference a record from Accounts Entity or Contacts Entity. Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-references#show-the-fields...

 

As an alternative solution, you could consider add a ComboBox inside the 'Company Name' field data card manually, then connect the ComboBox to your Accounts Entity, then bind the ComboBox to the 'Company Name' field.

 

I have made a test on my side, please consider take a try with the following workaround:

3.JPG

 

4.JPG

 

5.JPG

1. Add Accounts Entity as data source in your app.

2. Enable "Company Name" field data card in your Edit form, then unlock this data card.

3. Add a ComboBox and a Label inside the "Company Name" field data card. Set the Text property of Label to following:

 

"Company Name"

 

set the Items property of the ComboBox1 to following:

 

[@Accounts]

 

then specify the 'Full Name' field as display column value within your ComboBox1 (as above screenshot).

Set the SelectMultiple property of the ComboBox1 to following:

false

Set the DefaultSelectedItems property of this ComboBox1 to following:

 

AsType(ThisItem.'Company Name', [@Accounts])

 

 

Set the Update property of the "Company Name" field data card in your Edit form to following formula:

 

ComboBox1.Selected

 

 

Please check the following GIF screenshot for more details:

Test1.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,397)