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

How to get Json response to powerapps collection

Hi All,

 

I am trying to add Json response which i get from GRAPH API to PowerApps collection, i am able to pull that to collection but, not able to view it in Gallery, please check the information below and let me know how this can be done

 

Json:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('48d31887-5fad-4d73-a9f5-3c356e68a038')/onenote/sections",
    "value": [
        {
            "id": "1-0bc35248-e4e2-4759-ad85-89407bceccfe",
            "self": "https://graph.microsoft.com/v1.0/users/48d31887-5fad-4d73-a9f5-3c356e68a038/onenote/sections/1-0bc35248-e4e2-4759-ad85-89407bceccfe",
            "createdDateTime": "2017-08-07T16:08:45Z",
            "displayName": "Fabrikam",
            "lastModifiedDateTime": "2017-08-07T16:08:45Z",
            "isDefault": false,
            "pagesUrl": "https://graph.microsoft.com/v1.0/users/48d31887-5fad-4d73-a9f5-3c356e68a038/onenote/sections/1-0bc35248-e4e2-4759-ad85-89407bceccfe/pages",
            "createdBy": {
                "user": {
                    "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                    "displayName": "Megan Bowen"
                }
            },
            "lastModifiedBy": {
                "user": {
                    "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                    "displayName": "Megan Bowen"
                }
            },
            "links": {
                "oneNoteClientUrl": {
                    "href": "onenote:https://m365x214355-my.sharepoint.com/personal/meganb_m365x214355_onmicrosoft_com/Documents/Fabrikam.one"
                },
                "oneNoteWebUrl": {
                    "href": "https://m365x214355-my.sharepoint.com/personal/meganb_m365x214355_onmicrosoft_com/Documents/Fabrikam.one"
                }
            },
            "parentNotebook@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('48d31887-5fad-4d73-a9f5-3c356e68a038')/onenote/sections('1-0bc35248-e4e2-4759-ad85-89407bceccfe')/parentNotebook/$entity",
            "parentNotebook": null,
            "parentSectionGroup@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('48d31887-5fad-4d73-a9f5-3c356e68a038')/onenote/sections('1-0bc35248-e4e2-4759-ad85-89407bceccfe')/parentSectionGroup/$entity",
            "parentSectionGroup": null
        },
        {
            "id": "1-369dbd4a-9bb6-4357-b067-98601b723004",
            "self": "https://graph.microsoft.com/v1.0/users/48d31887-5fad-4d73-a9f5-3c356e68a038/onenote/sections/1-369dbd4a-9bb6-4357-b067-98601b723004",
            "createdDateTime": "2017-09-15T01:16:07Z",
            "displayName": "Winning ideas",
            "lastModifiedDateTime": "2017-09-15T01:16:14Z",
            "isDefault": false,
            "pagesUrl": "https://graph.microsoft.com/v1.0/users/48d31887-5fad-4d73-a9f5-3c356e68a038/onenote/sections/1-369dbd4a-9bb6-4357-b067-98601b723004/pages",
            "createdBy": {
                "user": {
                    "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                    "displayName": "Megan Bowen"
                }
            },
            "lastModifiedBy": {
                "user": {
                    "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                    "displayName": "Megan Bowen"
                }
            },
            "links": {
                "oneNoteClientUrl": {
                    "href": "onenote:https://m365x214355-my.sharepoint.com/personal/meganb_m365x214355_onmicrosoft_com/Documents/Notebooks/Megan%20@%20Work/Winning%20ideas.one"
                },
                "oneNoteWebUrl": {
                    "href": "https://m365x214355-my.sharepoint.com/personal/meganb_m365x214355_onmicrosoft_com/Documents/Notebooks/Megan%20@%20Work?wd=target%28%2F%2FWinning%20ideas.one%7C%2F%29"
                }
            },
            "parentNotebook@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('48d31887-5fad-4d73-a9f5-3c356e68a038')/onenote/sections('1-369dbd4a-9bb6-4357-b067-98601b723004')/parentNotebook/$entity",
            "parentNotebook": {
                "id": "1-e13f257d-78c6-46cf-ae8c-13686517ac5f",
                "displayName": "Megan @ Work",
                "self": "https://graph.microsoft.com/v1.0/users/48d31887-5fad-4d73-a9f5-3c356e68a038/onenote/notebooks/1-e13f257d-78c6-46cf-ae8c-13686517ac5f"
            },
            "parentSectionGroup@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('48d31887-5fad-4d73-a9f5-3c356e68a038')/onenote/sections('1-369dbd4a-9bb6-4357-b067-98601b723004')/parentSectionGroup/$entity",
            "parentSectionGroup": null
        }
    ]
}

 

Response that comes to collection:

Screen Shot 2019-06-19 at 1.12.44 PM.pngScreen Shot 2019-06-19 at 1.19.10 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: How to get Json response to powerapps collection

found the solution, use .value for collecting information to collection

ClearCollect(Notebooks,MicrosoftGraphAPI.GetOneNoteNotebooks().value);

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: How to get Json response to powerapps collection

@sannadisarath 

What is your Gallery Items property set to?  In this case it should be : Sections.value

 

I hope that is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper II
Helper II

Re: How to get Json response to powerapps collection

This is what i see when i add to gallery

Gallery Items was binded to Sections.Value, as you said below but i am not able to pull column values from collection

 

Screen Shot 2019-06-19 at 1.59.36 PM.png

Highlighted
Super User
Super User

Re: How to get Json response to powerapps collection

@sannadisarath 

Try to change your formula to : ThisItem.displayName

 

When you are in the Gallery rows and referencing the record for that row, you would do it through the ThisItem object.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper II
Helper II

Re: How to get Json response to powerapps collection

found the solution, use .value for collecting information to collection

ClearCollect(Notebooks,MicrosoftGraphAPI.GetOneNoteNotebooks().value);

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020 Winner Announced

Check it out!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,478)