web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Fetch API response and...
Power Apps
Unanswered

Fetch API response and display in the power app

(1) ShareShare
ReportReport
Posted on by

I have an API: "https://xepst. javra.com/cgi-bin/wspd_cgi.sh/ WService=xePST-prod-web/js/jsread.p?call=wfh"

whose response is as follows:

Screenshot 2024-07-04 at 12.04.31 PM.png
I want to create a power app that displays all the employee name that are on work from home today i.e EmployeeDetails.UserInfo.WFHRecords.Date = today's Date

Categories:
I have the same question (0)
  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Hey @rapan062 , 

     

    you have two possible ways to get this result.

    You can create a custom connector inside the power platform to use it directly in the app.

    Or you can use a flow. like this you could get around creating the connector and use the http request action. you could Then pass the table too power apps parse the Json and collect it into a collection. 

     

    you could then display the collection in a Gallery. 

     

    Let me know if you need further assistance. 

     

  • rapan062 Profile Picture
    on at

    Hey @DBO_DV. I tried making a custom connector but the values of the values are not being recognized inside the app. Can you guide me through the entire process? I can not find out where the problem is.

    Screenshot 2024-07-04 at 2.35.03 PM.png

     

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Yes no problem Could you show me the collection that you receive from your conector?

     

  • rapan062 Profile Picture
    on at

    I have created my connector as follows:
    Screenshot 2024-07-04 at 3.08.11 PM.pngScreenshot 2024-07-04 at 3.09.34 PM.png

    In my power app, i connect the custom connector through add data. Now on the OnStart property i write following formula:
    ClearCollect(
    WFHData,
    'XEPST API'.GetWFHRecords().EmployeeDetails.UserInfo
    );
    ClearCollect(
    WFHToday,
    ForAll(
    WFHData,
    {
    EmployeeID: EmployeeID,
    FullName: FirstName & " " & LastName,
    WFHRecords: WFHRecords
    }
    )
    );
    ClearCollect(
    WFHTodayRecords,
    ForAll(
    WFHToday,
    ForAll(
    WFHRecords,
    {
    EmployeeID: ThisRecord.EmployeeID,
    FullName: ThisRecord.FullName,
    Date: ThisRecord.Date,
    WFH: ThisRecord.WFH,
    WFHApproved: ThisRecord.WFHApproved,
    WFHRemarks: ThisRecord.WFHRemarks
    }
    )
    )
    );
    ClearCollect(
    WFHTodayFiltered,
    Filter(
    WFHTodayRecords,
    DateValue(Date) = Today() && WFH = true
    )
    );
    the following error shows

    Screenshot 2024-07-04 at 3.14.03 PM.png

    'GetWFHRecords' is an unknown or unsupported function in namespace ' 'XEPST API' '. 


  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Did you configure the response ? 

    DBO_DV_0-1720085721479.png

    DBO_DV_1-1720085751462.png

    If not it gets probably not recognized as a table. You can just import it from a sample 

    you can find it if you scroll a bit deeper then request. 

     

    Can you try this and let me know if it worked?

     

     

  • rapan062 Profile Picture
    on at

    If you cannot access above API. Let's try with another public API.
    I also tried this API: https://datausa.io/api/data?drilldowns=Nation&measures=Population.  

    I made a custom connector 'PopulationDataConnector' with action 'GetPopulationData'.


    Screenshot 2024-07-05 at 1.18.50 PM.png

    Screenshot 2024-07-05 at 1.19.08 PM.png

    and the response is also imported from sample response in the custom connector. I tested the custom connector and the result is as follows:

    Screenshot 2024-07-05 at 1.20.29 PM.png

    Now in the power apps, I inserted a button label. In the button's onSelect Property i wrote the following formula:

    ClearCollect(populationCollectionPopulationDataConnector.GetPopulationData({drilldowns:"Nation",measures:"Population"}).data)

    Following error is shown.
    Screenshot 2024-07-05 at 1.16.37 PM.png
    Yes, the connector is connected in the data section. Why is this error coming?
  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Hey @rapan062 ,

    Could you try this version?

    ClearCollect(populationCollection, PopulationDataConnector.GetPopulationData({drilldowns:"Nation",measures:"Population"}))

    If that does not work could you try putting it into a Variable? 

    Then probably it will not be recognized as a table. 

     

    We would have to look together how you've imported the response. 

     

     

  • rapan062 Profile Picture
    on at

    rapan062_1-1720415568896.png

    In custom connector, I copied the API response and click import.

    rapan062_2-1720415631194.png

     

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Have you tried my suggestion?

     

  • rapan062 Profile Picture
    on at
    Set(populationData, PopulationDataConnector.GetPopulationData({drilldowns: "Nation", measures: "Population"}));
    ClearCollect(populationCollection, populationData)

    As you suggested, I put the data in a variable. Still the same error is coming which is shown in above reply.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard