I am trying to follow this example

I am trying to follow this example
forum.appian.com/.../Connector_Functions.html

where Appian is consuming data from weather API exposed by Yahoo.

Getting the following error: Interface Definition: Expression evaluation error at function a!fromJson [line 15]: Invalid index: Cannot index property 'body' of type Text into type Text

OriginalPostID-185714

OriginalPostID-185714

  Discussion posts and replies are publicly visible

Parents
  • At a guess, the response you're getting does not contain an element of body. Try running the below in an expression rule and paste the result here so we can see what's wrong.

    a!httpQuery(
    /* Details about the Yahoo! Weather API can be found at: developer.yahoo.com/.../ */
    url: "query.yahooapis.com/.../yql",
    queryParameters: {
    /* a!httpQuery will automatically url-encode query parameters for you,
    * so it's OK to include spaces in the value of a query parameter */
    a!httpQueryParameter(
    name: "q",
    value: "select * from weather.forecast where woeid = 2514815"
    ),
    a!httpQueryParameter(
    name: "format",
    value: "json"
    ),
    a!httpQueryParameter(
    name: "env",
    value: "store"
    )
    }
    )
Reply
  • At a guess, the response you're getting does not contain an element of body. Try running the below in an expression rule and paste the result here so we can see what's wrong.

    a!httpQuery(
    /* Details about the Yahoo! Weather API can be found at: developer.yahoo.com/.../ */
    url: "query.yahooapis.com/.../yql",
    queryParameters: {
    /* a!httpQuery will automatically url-encode query parameters for you,
    * so it's OK to include spaces in the value of a query parameter */
    a!httpQueryParameter(
    name: "q",
    value: "select * from weather.forecast where woeid = 2514815"
    ),
    a!httpQueryParameter(
    name: "format",
    value: "json"
    ),
    a!httpQueryParameter(
    name: "env",
    value: "store"
    )
    }
    )
Children
No Data