Hello, I am trying to Read From and Write To a Web API , as I am new to it

Hello,
I am trying to Read From and Write To a Web API , as I am new to it I have followed the basic example at
forum.appian.com/.../Connector_Functions.html
But it gave me an error
"Cannot index property 'body' of type Text into type Text"
did anyone happen face the same issue???


Thanks in advance

OriginalPostID-188881

OriginalPostID-188881

  Discussion posts and replies are publicly visible

Parents
  • Hi Tom ... here is the expression

    load(
    local!countIoGroupUrl: "count.io/.../",
    local!count: bind(
    get: a!fromJson(
    jsonText: a!httpQuery(
    url: local!countIoGroupUrl & "example"
    ).result.body
    ).count,
    set: a!httpWrite(
    url: _,
    method: "POST"
    )
    ),
    a!dashboardLayout(
    firstColumnContents: {
    a!textField(
    label: "Counter",
    instructions: "Use the +1 and -1 buttons below to increase or decrease the counter above",
    value: local!count,
    readOnly: true
    ),
    a!buttonLayout(
    secondaryButtons: {
    a!buttonWidget(
    label: "- 1",
    value: local!countIoGroupUrl & "example-",
    saveInto: local!count
    ),
    a!buttonWidget(
    label: "+ 1",
    value: local!countIoGroupUrl & "example+",
    saveInto: local!count
    )
    }
    )
    }
    )
    )
Reply
  • Hi Tom ... here is the expression

    load(
    local!countIoGroupUrl: "count.io/.../",
    local!count: bind(
    get: a!fromJson(
    jsonText: a!httpQuery(
    url: local!countIoGroupUrl & "example"
    ).result.body
    ).count,
    set: a!httpWrite(
    url: _,
    method: "POST"
    )
    ),
    a!dashboardLayout(
    firstColumnContents: {
    a!textField(
    label: "Counter",
    instructions: "Use the +1 and -1 buttons below to increase or decrease the counter above",
    value: local!count,
    readOnly: true
    ),
    a!buttonLayout(
    secondaryButtons: {
    a!buttonWidget(
    label: "- 1",
    value: local!countIoGroupUrl & "example-",
    saveInto: local!count
    ),
    a!buttonWidget(
    label: "+ 1",
    value: local!countIoGroupUrl & "example+",
    saveInto: local!count
    )
    }
    )
    }
    )
    )
Children
No Data