cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rogerscharlesc
Frequent Visitor

Create HTML table - Column value cannot be evaluated

I'm having an issue when taking data from List Rows (CDS) and creating an HTML table from it. I'm filtering the data from Dynamics using a fetch query and defining custom columns in the Create HTML table step. I'm able to define most of my columns except for a single date column. I see the column show in the raw inputs but for whatever reason, when I try to create the column using item()['p.hsl_targetcompletiondate'] (exactly how it appears in the raw input), it throws the following error:

 

InvalidTemplate. The execution of template action 'Create_HTML_table' failed. The column values could not be evaluated: 'The template language expression 'item()['p.hsl_targetcompletiondate']' cannot be evaluated because property 'p.hsl_targetcompletiondate' doesn't exist, available properties are '@odata.type, @odata.id, @odata.etag, @odata.editLink, hsl_fulfillmentmanual@OData.Community.Display.V1.FormattedValue, hsl_fulfillmentmanual@odata.type, hsl_fulfillmentmanual, hsl_projectteammemberid@odata.type, hsl_projectteammemberid, p.hsl_relatedaccount@OData.Community.Display.V1.AttributeName, p.hsl_relatedaccount@OData.Community.Display.V1.FormattedValue, p.hsl_relatedaccount@Microsoft.Dynamics.CRM.lookuplogicalname, p.hsl_relatedaccount@odata.type, p.hsl_relatedaccount, p.hsl_name@OData.Community.Display.V1.AttributeName, p.hsl_name'. Please see https://aka.ms/logicexpressions for usage details.'.

 

I've tried a number of things including removing all of the steps and re-adding them. The target column just won't appear in the list of useable properties defined in the error message.


Any help is appreciated! 

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User III
Super User III

Does that field work if you put it into a select action? or does it also not work there?

View solution in original post

12 REPLIES 12
Paulie78
Super User III
Super User III

This is a pain - the reason is because there is a dot/fullstop/period in the field name. Instead of using the output of the List Rows action to create your HTML table, add a select action after list rows. Use the select to create the column names you want in your HTML table. 

Then use the output of the select as the input for the HTML table, you won't need to specify column names in the HTML table step, because you will have already done it in the select.

Thanks, I gave that a shot, but got the same error. The weird thing is, that other columns have a "." in the field name too, but they work fine. Here is the resulting error:

InvalidTemplate. The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "AccountName": "@item()['p.hsl_relatedaccount']", "ProjectName": "@item()['p.hsl_name']", "FulfillmentPercentage": "@item()['hsl_fulfillmentmanual@OData.Community.Display.V1.FormattedValue']", "TargetCompletionDate": "@item()['p.hsl_targetcompletiondate']" }' failed: 'The template language expression 'item()['p.hsl_targetcompletiondate']' cannot be evaluated because property 'p.hsl_targetcompletiondate' doesn't exist, available properties are '@odata.type, @odata.id, @odata.etag, @odata.editLink, hsl_fulfillmentmanual@OData.Community.Display.V1.FormattedValue, hsl_fulfillmentmanual@odata.type, hsl_fulfillmentmanual, hsl_projectteammemberid@odata.type, hsl_projectteammemberid, p.hsl_relatedaccount@OData.Community.Display.V1.AttributeName, p.hsl_relatedaccount@OData.Community.Display.V1.FormattedValue, p.hsl_relatedaccount@Microsoft.Dynamics.CRM.lookuplogicalname, p.hsl_relatedaccount@odata.type, p.hsl_relatedaccount, p.hsl_name@OData.Community.Display.V1.AttributeName, p.hsl_name'. Please see https://aka.ms/logicexpressions for usage details.'.

Paulie78
Super User III
Super User III

It seems to believe that the column p.hsl_targetcompletiondate does not exist, have you confirmed it is there by examining the raw JSON output of the list rows action?

Yeah, that's the weird thing, it shows up in the raw output from list rows. See below:
        
    "@odata.type""#Microsoft.Dynamics.CRM.hsl_projectteammember",
                "@odata.etag""W/\"276970016\"",
                "@odata.editLink""hsl_projectteammembers(a28e3219-9701-eb11-a813-000d3a33243a)",
                "hsl_fulfillmentmanual@OData.Community.Display.V1.FormattedValue""20.000",
                "hsl_fulfillmentmanual@odata.type""#Decimal",
                "hsl_fulfillmentmanual"20,
                "hsl_projectteammemberid@odata.type""#Guid",
                "hsl_projectteammemberid""a28e3219-9701-eb11-a813-000d3a33243a",
                "p.hsl_relatedaccount@OData.Community.Display.V1.AttributeName""hsl_relatedaccount",
                "p.hsl_relatedaccount@OData.Community.Display.V1.FormattedValue""xxxx",
                "p.hsl_relatedaccount@Microsoft.Dynamics.CRM.lookuplogicalname""account",
                "p.hsl_relatedaccount@odata.type""#Guid",
                "p.hsl_relatedaccount""71f6348d-d46a-ea11-a811-000d3a378f47",
                "p.hsl_name@OData.Community.Display.V1.AttributeName""hsl_name",
                "p.hsl_name""xxxx ",
                "p.hsl_targetcompletiondate@OData.Community.Display.V1.AttributeName""hsl_targetcompletiondate",
                "p.hsl_targetcompletiondate@OData.Community.Display.V1.FormattedValue""5/31/2021",
                "p.hsl_targetcompletiondate@odata.type""#Date",
                "p.hsl_targetcompletiondate": "2021-05-31"
Paulie78
Super User III
Super User III

weird, I just tried it with your json and it worked fine.

createHTMLTable.PNG

In the select I used the expression:

item()['p.hsl_targetcompletiondate']

Yeah, very strange. It's in the input so it makes sense that it would work but not sure why it doesn't in my scenario. Perhaps I'll add yet another step between list rows and create table to try to get the field to appear.

Paulie78
Super User III
Super User III

Did you try the expression that I used above?

Yep, that's actually what I was already using, but I copied and pasted yours in there. Still no dice.

Paulie78
Super User III
Super User III

Be interested to hear how you get on. If you run out of ideas we could do a teams session and I will see if I can figure it out.

Tried some other fields in the dataset, including date fields, they all work fine. It's this darn field for some reason. Cannot figure out why it would be excluded ><

Paulie78
Super User III
Super User III

Does that field work if you put it into a select action? or does it also not work there?

View solution in original post

Nope, select and filter array don't work with it either.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (77,071)