Kaja
Kaja

Reputation: 3057

Property selection is not supported on values of type 'Integer'

I would like to send this dynamic content:

content:@concat(formatDateTime(adddays(utcnow(),-1),'mm'),formatDateTime(adddays(utcnow(),-1),'dd'))

from web activity in Azure Data Factory to logic Apps.

on the logic app side I have defined such a body: enter image description here

in the second step I would like to extract the value: enter image description here

but after running at this step I get this error:

InvalidTemplate. Unable to process template language expressions in action 'Extract' inputs at line '1' and column '1292': 'The template language expression 'triggerBody()?['ID']' cannot be evaluated because property 'ID' cannot be selected. Property selection is not supported on values of type 'Integer'. Please see https://aka.ms/logicexpressions for usage details.'.

How can I solve this problem?

Upvotes: 3

Views: 15307

Answers (2)

Ganesh Ghadge
Ganesh Ghadge

Reputation: 161

Add

Content-type = application/json

in request header.

Upvotes: 16

George Chen
George Chen

Reputation: 14334

From my test and your error message, your ID in your content must be like this:

{
    "ID":222223
}

In this way, The ID would be in String type. So you need to change your ID into String type like this:

{
    "ID":"222223"
}

Or change your JSON Schema "ID" type to Integer and the Variable Type to Integer. Then the logic apps will work.

enter image description here

Upvotes: -1

Related Questions