cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
saturation
Resolver I
Resolver I

Parse JSON error in Create HTML Table / CDS

I am looping through a set of records using List Records in CDS, creating an array, then using that array to build an HTML table. However, when I try to put the fields into the output for the HTML Table, I get the error at the bottom here. My JSON is directly below, and the error is below that. Can someone help me figure this out? Looks like a data type issue, just not sure how to solve.
Also, in my Create HTML Table action, I'm using @body('Parse_JSON')?['fieldstring']
 
    "type""array",
    "properties": {
        "account": {
            "type""string"
        },
        "fieldstring": {
            "type""string"
        },
        "string2": {
            "type""string"
        }
    }
}

 

The execution of template action
'Create_HTML_table' failed. The column values could not be evaluated:  'The template language expression 'body('Parse_JSON')?['fieldstring']' cannot be evaluated because property 'fieldstring' cannot be selected.  Array elements can only be selected using an integer index.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @saturation ,

 

The source of the HTML table should be an array, and your call is just a property of the object contained in this array.

 

Is it convenient for you to share sample data and screenshots of Flow configuration so that we can provide you with a suitable workaround?

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

 

Hi @saturation ,

 

The source of the HTML table should be an array, and your call is just a property of the object contained in this array.

 

Is it convenient for you to share sample data and screenshots of Flow configuration so that we can provide you with a suitable workaround?

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-bacao-msftThank you - I accessed it like you said as an array and it worked. I will have more related questions though. 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,321)