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.
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.
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.
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:
Set the Items property of the ComboBox within the TaskLists Data card to following:
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:
then all available column names would show up as below:
then you could find your LookUp field display name from there.
Also please consider modify above formula as below:
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.
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
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. ?
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:
As an fixed solution, please consider set the Primary Text and SearchField property to name column. Please check the following GIF screenshot as below:
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:
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.
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.
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:
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:
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)
Please consider take a try with above formula, then check if the issue is solved.
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.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200