cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jernejp
Level: Powered On

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
Community Support Team
Community Support Team

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
jernejp
Level: Powered On

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

Community Support Team
Community Support Team

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

jernejp
Level: Powered On

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
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (6,881)