For this example, we are taking the Company Name customer lookup column of the contact table.
We start by adding the Customer Name field to the form.
That adds a card to the form, let us add the required controls to get it working
Radio Button, Combo box, and Text Label for the combo box.
Change the Items property of the radio button to show the contact and account option.
Also, change the Layout to Horizontal and Default as Contact.
And set the Items property of the Combo box as below –
Based on the value selected in the radio button, we are setting the Data Source and also applying the Sort and Distinct function to it, along with StartsWith for delegation.
We have also set Allow searching as On for the combo box.
For the Contact option selected –
For the Account option selected –
Also, we can set the OnChange property of the radio button to Reset(comboControl) to clear the selection when the user switches between Contact and Account options.
Now to have this value saved back we can specify the Update property of the custom data card in which we have placed these controls.
Hope it helps..
One thought on “Using Customer Lookup in Canvas Apps (Dataverse)”