cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmanning
Super User
Super User

Canvas App - Converting a Working App From SP Lists to a Dataverse Data Source Choice Column Types

I have a canvas app that has been working w/o issue for over a year using SP lists as the data sources.  Now I am converting the app to use a Dataverse data source and there are some errors I need.  The screen shown below, has a gallery on the left (see ThisItem errors) and an HMTL text field on the right (see HTML Text errors).
Deal Intake App Assignb Screen.png
The code below is for the gallery's Fill property. 
DV errors ThisItem for Choice cols.png

 

 

// SP List code with choice column errors
If( ThisItem.'Request-Status'.Value = "New", RGBA(255, 0, 0, 1), ThisItem.'Request-Status'.Value = "Scheduled", RGBA(54, 176, 75, 1), ThisItem.'Request-Status'.Value = "Completed Offline", RGBA(52, 178, 187, 1), ThisItem.'Request-Status'.Value = "Completed Live Meeting", RGBA(0, 0, 204, 1), ThisItem.'Request-Status'.Value = "On Hold", RGBA(255, 145, 0, 1) )

 

 

The code below is for HTML text in the right-hand side "Deal Information" section.
DV errors SELECTED for Choice cols.png

 

 

 "<ul>
    <li><b>Deal Request ID: </b>" & " " & galleryLHAssignResources.Selected.Name & "</li>
    <li><b>Request Status: </b>" & " " & galleryLHAssignResources.Selected.'Request-Status'.Value & "</li>
    <li><b>SFDC Opp Acct Name: </b>" & " " & galleryLHAssignResources.Selected.'SFDC-Opp-Acct-Name' & "</li>
    <li><b>SFDC OP ID: </b>" & " " & galleryLHAssignResources.Selected.'SFDC-Opp-ID' & "</li>
    <li><b>Deal Term: </b>" & " " & galleryLHAssignResources.Selected.DealTerm & "</li>
    <li><b>Client Due Date: </b>" & " " & galleryLHAssignResources.Selected.'Client-Due-Date' & "</li>
    <li><b>Close Date: </b>" & " " & galleryLHAssignResources.Selected.'Close-Date' & "</li>
    <li><b>TCV: </b>" & " $" & galleryLHAssignResources.Selected.TCV & "</li>
    <li><b>Pricing-Required: </b>" & If( galleryLHAssignResources.Selected.'Pricing-Required' = true, "Yes", "No" ) & "</li>
    <li><b>Sector: </b>" & " " & galleryLHAssignResources.Selected.Sector.Value & "</li>
    <li><b>Sales Stage: </b>" & " " & galleryLHAssignResources.Selected.'Sales-Stage'.Value & "</li>
    <li><b>RFx Sole Source: </b>" & " " & galleryLHAssignResources.Selected.'RFx-Sole-Source'.Value & "</li>
    <li><b>Submission Format: </b>" & " " & galleryLHAssignResources.Selected.'Submission-Format'.Value & "</li>
    <li><b>DHC Closer Score: </b>" & " " & galleryLHAssignResources.Selected.'DHC-Closer-Score'.Value & "</li>
    <li><b>DHC Predictor Score: </b>" & " " & galleryLHAssignResources.Selected.'DHC-Predictor-Score'.Value & "</li>
    <li><b>Presenters: </b>" & " " & galleryLHAssignResources.Selected.'Presenter(s)' & "</li>
    <li><b>Other Invitees: </b>" & " " & galleryLHAssignResources.Selected.'Other-Invitees' & "</li>
    <li><b>Requested By: </b>" & " " & galleryLHAssignResources.Selected.'Created By'.Email & "</li>
    <li><b>Offerings: </b>" & " " & Concat( galleryLHAssignResources.Selected.Offerings.Value, Value, ", ") & "</li>
    <li><b>Requestor Comments: </b>" & " " & galleryLHAssignResources.Selected.'Requestor-Comments' & "</li>
    <li><b>Reviewer Comments: </b>" & " " & galleryLHAssignResources.Selected.'Reviewer-Comments' & "</li>
</ul>"

 

Here are the Dataverse column names for ref.
DealIntakeApp Table
DIApp - DealIntakeApp table col names.png
AssignedUsers Table
DIApp - AssignedUsers table col names.png

 Any recommendations are greatly appreciated.

18 REPLIES 18

@iAm_ManCat - Yes double quotes were required. 
DV errors ThisItem for Choice cols V.png
The error is still limited to ThisItem formula.  I tried double quotes there as well but it still errored out "Name isn't valid. The identifier isn't recognized".

ThisItem.publishername_dealintakeapp_RequestStatus.RequestStatus

 

By making both sides of the formula double quotes you are just comparing two strings rather than filtering by a conditional formula.

 

"yellow" = "green"

Which is false. Filtering by false, results in all records being returned for a filter, and in the case of lookups the first valid record being returned (regardless of status)

 

So, Let's take this back a step,

We are trying to get that column name for the schema name, so please can you get a screenshot of the displayname next to the schema name in the table in Dataverse?

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


@iAm_ManCat - Here is the info you requested.  Let me know if you need additional information. Thank you!
RequestStatus DV Info.png

ok, so that makes much more sense now - the column name is cr4de_RequestStatus rather than cr4d3_dealintakeapp_RequestStatus.

 

So our formula should be something like:

 

If(
   LookUp( DealIntakeApps, cr4de_RequestStatus = "New" ).RequestStatus
   in 
   ThisItem.cr4de_RequestStatus,
   RGBA(255,0,0,1),
   RGBA(0,0,0,1)
)

 

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


@iAm_ManCat - Thank you for the new info. 
The LookUp() "cre4de_RequestStatus" required double quotes to clear the error.  Unfortunately, I can't clear the error in ThisItem as it won't accept ThisItem.cr4de_RequestStatus.  When I type ThisItem. the only options are related to Duplicate Records (see image below) which will not work.  Any recommendations?  Thanks in advance. 
DV errors ThisItem for Choice cols VI.png

 

Please, don't just randomly put quotes around things, that is not helping us and it is not solving the error in the way you think it is. As I explained before, if both sides are quotes then there is no datasource-based comparison going on, you are just comparing whether the string "cr4e_RequestStatus" is equal to the string "New". You could put "fartingUnicorns" = "HopesAndDreams" as that equates to the same formula you have when you put quotes on both sides.

 

I've tried to recreate your table as closely as I can and the only thing I think that could be different is that in your case we are likely referencing a custom choice that you have set up called cr4de_requeststatus(all lowercase). Please try using lowercase as per this formula:

 

If(
   "New" in ThisItem.cr4de_requeststatus,
   RGBA(255,0,0,1),
   RGBA(0,0,0,1)
)

 

 

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


@iAm_ManCat - I was introducing double quotes and relying on intellisense which I see now was a mistake.

Your new code resolves my errors so thank you so much for providing the solution and I appreciate your time!

Yes, the intellisense can be a bit... unintelligent at times

Glad we got it resolved though and hopefully you've gained some deeper knowledge on the situation 🙂

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


@iAm_ManCat - Yes you have taught me a lot from this thread.  Thank you again!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,324)