cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Combobox only shows guids on customer

I am trying to make an app for Cases. But when I make a Combobox for Customers (Connected  to Dynamics 365) it shows me only the GUIDS. I know the customers can be both contact and account, so I cant use Lookup().

 

#1 So how could I get the correct name of the Customer and not only the GUID?
#2 I also would like to have the customers in the combobox where I have am the case owner. How should I do that?

 

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Combobox only shows guids on customer

HI @olahansen ,

Could you please share a bit more about the data structure of your Customers Entity?

Do you want to display the Customer names within your app instead of GUID values (e.g. 'bd78af07-c15c-e911-a989-000d3a82867e')?

Further, does your Customers Entity LookUp values from your Account Entity or Contact Entity?

 

I suppose that you add LookUp fields in your Customers fields to reference values from your Account Entity or Contact Entity, is it true?

 

Actually, when you references values from your Customer Entity to your Account or Contact Entity, the Customers Entity use a unique Primary Key value (GUID, e.g. "bd78af07-c15c-e911-a989-000d3a82867e") of Target Entity to find the specific record in your Target Entity.

 

For your first question, if you want to get the correct name of the Customer, the only way I came up with is that find the specific reocrd within the Target Entity (Account Entity or Contact Entity) using LookUp function based on the GUID values from your Customers Entity.

Based on the needs that you mentioned, I think the If function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

If( /* <-- Check if could find a reocrd in Account Entity or Contact Entity based on a specific GUID value */
   !IsBlank(LookUp(Accounts, Account = GUID("b287f8b6-xxxx-e911-xxxx-xxxx3a8281d0"), 'Account Name')),
   LookUp(Accounts, Account = GUID("b287f8b6-xxxx-e911-xxxx-xxxx3a8281d0"), 'Account Name'),
   !IsBlank(LookUp(Contacts, Contact = GUID("bd78af07-xxxx-e911-xxxx-xxxx3a82867e"), 'Full Name')),
   LookUp(Contacts, Contact = GUID("bd78af07-xxxx-e911-xxxx-xxxx3a82867e"), 'Full Name')
)

Note: The "b287f8b6-xxxx-e911-xxxx-xxxx3a8281d0" represents the GUID values from your Customers Entity. The GUID value is unqiue within Dynamics 365 Entity.

 

For your second question, could you please share a bit more about your needs? Do you want to display the Customer actual name along with the GUID within the ComboBox?

If you want to display the Customer actual name along with the GUID within the ComboBox, I think the AddColumns function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the Items property of the ComboBox to following:

AddColumns(
             'Customers Entity',
              "ActualName",
              If(
!IsBlank(LookUp(Accounts, Account = LookUpField.Account, 'Account Name')),
LookUp(Accounts, Account = LookUpField.Account, 'Account Name'),
!IsBlank(LookUp(Contacts, Contact = LookUpField.Contact, 'Full Name')),
LookUp(Contacts, Contact = LookUpField.Contact, 'Full Name')
) )

then within your ComboBox, you use the ActualName column as DisplayField.

Please take a try with above solution, check if the issue is solved.

 

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.
Highlighted
New Member

Re: Combobox only shows guids on customer

Thank you @v-xida-msft  for you answer.

 

I have added an attachment to show what I mean.

 

I am using a standard dynamics 365 setup with the entity Cases.

 

#1 My first question is how can I, instead of all th GUIDs get the Names of the account/contact. As you can see it is easy to figure out what is contact and what is account. But another thing that is confussing me is that the combobox is using the format 

["_customerid_type","_customerid_value"]

which  I am not familiar with. Could I still use the same if-sentence? Because it fails to me.

#2 

In the same combobox it lists All the Customer on cases. But I want to only show the Customers on the cases I am the owner.

 

Thank you in advance.

 

Highlighted
Community Support
Community Support

Re: Combobox only shows guids on customer

Hi @olahansen ,

Could you please share a bit more about the Customer column in your Entity?

 

For your first question, the "_customerid_type" and "_customerid_value" are both components of the Customer column (customerid). In other words, a Customer value defined by "_customerid_type" and "_customerid_value".

Could you please share more details about the formula you typed within the ComboBox control?

 

For your second question, I think the Filter function could achieve your needs. Please set the Items property of the ComboBox to following:

Filter(
         'Your Customer Entity',
          'Created By'.'Primary Email' = User().Email
)

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.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,620)