cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rkaur
Level: Powered On

Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi,

 

I need to show standard Product field on case entity on to my canvas app. It shows GUID value and also errors out stating "Function search has invalid arguments"  - Choices(Cases.productid)

When i try to use Lookup function to show product name instaed of GUID, teh "productid" field doesnt show up only in dropdown. - LookUp(Products,productid=ThisItem.prod<??>,name)

 

Please refer to screenshots.

 

Ques> What is searchItem property. How do i fix it for datacardValue? Also kindly help fix the lookup function.

 

Additionally to highlight, as soon as i add the product field on details form, my Browe gallery  of Cases goes blank (no values shown for title,subtitle,body). Its weird but thast what is happening. I tested it by removing teh product field from form and my gallery i had to reinstate and it comes back.

lookup function to fetch product name.PNG

 

product lookup on case.PNG

 

 

9 REPLIES 9
Super User
Super User

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi @Rkaur 

 

Can you please verify few details:
 
Combobox: Items -> Choices(Cases.productid) -> is productid the name of lookup column created for your product entity in Case entity?
 
Combobox: Display Field and Search Field: they should be set to the name of attribute you want to show in the combobox results.
 
For getting the value of the related entities added as lookups, you do not need to write any additionally formula, for a specific gallery item, they can be returned as :  ThisItem.<LookUpColumnName>.<RelatedEntityAttributeName>
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Rkaur
Level: Powered On

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi,

 

It is a standard Product lookup field on case entity (CDS)

teh field name "productid" does exist "

secondly both my SearchFields and DisplayFields property is set to ["CreatedByExternalParty"]

 

Also, i did try with ThisItem.<LookUpColumnName>.<RelatedEntityAttributeName>

 

I have a feeling it doesnt work because of this strange behavior taht i noticed as i mentioned in my post 

"Additionally to highlight, as soon as i add the product field on details form, my Browse gallery  of Cases goes blank (no values shown for title,subtitle,body). SO even my detail form which previously was showing all data cards now shows nothing. Its weird but thast what is happening. I tested it by removing the product field from FORM and my gallery i had to reinstate and all comes back. Even teh gallery data and teh Details form data"

ANy thoughts on this.

 

Highlighted
Rkaur
Level: Powered On

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi,

 

Can anyone please elp me on this.

im unable to show product field on case entity detail form in canvas app.

It throws error as shown above in my screenshots. Also it blanks out my form for soem reason im unaware of.attaching my detasil form screenshot befroe adding product lookup. After i add the lookup, teh entire form goes blank and also my product lookup formula also doesnt work.detail form before adding product lookup.PNG

 

Community Support Team
Community Support Team

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi @Rkaur ,

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:3.JPG

 

1.JPG

Set the Items property of the ComboBox within the TaskLists Data card to following:

Choices(Tasks.TaskLists)

Note: The TaskLists is the LookUp field in my Tasks Entity.

On your side, please consider modify the formula within the Items property of the Product ComboBox to following:

Choices(Cases.Product) /* <-- the Product represents the display name of your LookUp field within your app */

Within your app, you could type the following formula:

Choices(Cases.

then all available column names would show up as below:2.JPG

then you could find your LookUp field display name from there.

 

Also please consider modify above formula as below:

Choices([@Cases].Product)

 then check if the issue is solved.

 

Please also make sure that you have turned on the "Relational data, option sets, and other new features for CDS" option within Advanced settings of App settings of your app.

 

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.
Rkaur
Level: Powered On

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

HI Kris,

 

I understand its a very basic use case and thats why im going more crazy fixing it.

i tried wht you suggested too. but to no luck

product error 2.PNG 

as per orginal Choices function.. choices(cases.productid) was defaulted ( my screenshots above) but actually we dont see "productid" as an option with dot operator (screenshot above)

 

May i request you to replicate the exact issue with Case entity involved and adding its product field on to the app detail form while keeping the gallery simple to just case title and any otehr field. If you may confirm data card values go blank for you as well, the moment you add this lookup field. ?

Community Support Team
Community Support Team

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi @Rkaur ,

Yeah, you are right. I have made a test on my side (generate an app based on Case Entity), and the issue is confirmed on my side.

 

Based on the issue that you mentioned, I think this issue is related to Primary Text and SearchField value you set within your Product ComboBox. The Original Primary Text and SearchField value of your Product ComboBox shoulod be as below:1.JPG

 

As an fixed solution, please consider set the Primary Text and SearchField property to name column. Please check the following GIF screenshot as below:Test.gif

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

Note: The Items property of the Product ComboBox should be set to following:

Choices(Cases.Product)

 

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.
Rkaur
Level: Powered On

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi Kris,

 

This works  but can you please explain we removed the original Items property defaulted as "Choices(cases,productid) to Choices(Cases,Product). 

I assuem even you could see that productid doesnt exist as a field when we search using dot operator ?

 

Secondly, Did you also notice that all the other data card values went blank the moment product field was added.

Even when we fix the error in this field, the values are still not coming back. If you browse back to your gallery, that also shows data only for "created on" field nothing shows up for 'case number', 'case title', 'customer', etc.

attaching screen for reference.

browse gallery shows no data.PNG

 

Thirdly, need to get the actual product name from GUID. Lookup doesnt work. 

LookUp(Products,Product=Choices(Cases.Product),name) /* here again productid attribute from Products table  which holds the guid value isnt visible. so i tried with just "Products,Product" but to no luck*/

How do we fetch the actual product name from the GUID.

Community Support Team
Community Support Team

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

Hi @Rkaur ,

For your first question, actually, the Product is the Display name of the productid column (logical name) in your Case Entity. Currently, within PowerApps, when using column value of data source in canvas app, it would use Display name as referenced column rather than logical name.

Please check and see the following blog for more details:

https://powerapps.microsoft.com/en-us/blog/display-names-and-guids-for-canvas-apps-graduate/

 

For your second question, the Case Entity is a restricted Entity in CDS, if you want to use canvas app to make some changes to your CDS Entity, please make sure your account has owned the following Dynamics 365 License:

1.Dynamics 365 for Customer Service, Enterprise edition 
2.Dynamics 365 Customer Engagement plan 
3.Dynamics 365 plan

More details about the restricted Entity, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/data-platform-restricted-entiti...

On your side, please consider remove the SortByColumns(...) formula from the Items property of the Gallery, then re-type it again, check if the issue is solved. The SortByColumns(...) formula as below:

SortByColumns(Search(Cases, TextSearchBox1.Text, "description","title"), "description", If(SortDescending1, Descending, Ascending))

For your third question, I think there is something with your formula. You could consider add a Label within your Gallery, set the Text property to following:

LookUp(Products, Product = ThisItem.Product.Product, Name)

Or

ThisItem.Product.Name

Please consider take a try with above formula, then 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.
Rkaur
Level: Powered On

Re: Product lookup field on case form shows guid value with error in searchItems property. Lookup function doesnt work too.

HI Kris,

 

as a workaroudn to resolve issue#2 of form fields becoming blank, added a custom field lookup to Products entity which strangely works absolutely fine when added on form as in it doesnt blank out teh rest of teh data as against the OOB Product lookup field on case entity. Its the lookup to same product entity as teh OOB field was.

 

For issue#3, lookup function doesnt work . it was showing GUID.

with new custom lookup field i used the  formula ThisItem.'Product Name' <my custom attribute name> and it shows blank only with delegation warning.

 

SO in short OOB fiels isnt working and cutom field isnt too. with each having its own set of issues. Smiley Sad

new product field on case.png

 

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 50 members 4,908 guests
Please welcome our newest community members: