cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Parsing JSON - getting boolean instead of JSON object

Hi,

 

I have a custom connector, that when testing it in connector definition screen, returns data like this:

{
  "rvcDate": "2019-12-09T00:00:00",
  "data": [
    {
      "id": "ABC",
      "salesValue": 0,
      "rvcValue": 0,
      "rvcPercent": 0
    },
    {
      "id": "XYZ",
      "salesValue": 123,
      "rvcValue": 321.1,
      "rvcPercent": 12.98
    }
  ],
... and so on


When I use it in Powerapps like this, it returns TRUE instead of JSON.

Set(
    CompanyInfoJSON,
    GetCompanyInfo.GetInfo({id: BusinessPartner.Bussines_Partner_Id})
)

 

Any ideas, why the variable isn't set?


Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Parsing JSON - getting boolean instead of JSON object

Hi @jernejp ,

Maybe you could try this:

Set(
    CompanyInfoJSON,
    JSON(GetCompanyInfo.GetInfo({id: BusinessPartner.Bussines_Partner_Id}))
)

This function could be used to generates a JSON text string for a table, a record, or a value. 

Here's a doc about this function for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-json

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

3 REPLIES 3
Highlighted
Helper IV
Helper IV

Re: Parsing JSON - getting boolean instead of JSON object

I did some more testing within the app (using the new Monitor feature) and it seems that the application DOES get the right response, but it's saved as true.

response.PNG

Highlighted
Community Support
Community Support

Re: Parsing JSON - getting boolean instead of JSON object

Hi @jernejp ,

Maybe you could try this:

Set(
    CompanyInfoJSON,
    JSON(GetCompanyInfo.GetInfo({id: BusinessPartner.Bussines_Partner_Id}))
)

This function could be used to generates a JSON text string for a table, a record, or a value. 

Here's a doc about this function for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-json

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Highlighted
Helper IV
Helper IV

Re: Parsing JSON - getting boolean instead of JSON object

Hi,

 

That, along with some tweaks to my connector worked.

Thank you @v-yutliu-msft !

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,474)