How to load a repeating group with data from an external API call?

I can’t figure out how to load my repeating group with data from an external API call.

I have an API call that gets a list of users Facebook pages. It’s a “data” type of API call so I can access it inside elements.

I want each cell of the repeating group to contain a set of Facebook page data (name, picture, url, etc). That way each cell of my repeating group will represent a Facebook page of the user.

Example:

  • Repeating group has Type of Content is set to the Facebook pages API call
  • Repeating group has Data Source set to “get data from external API” using the same Facebook pages API call.
  • The external API call settings use the same Facebook pages API call, and it’s params are filled in a shown.

But the data source is showing red (i.e. not working).

Why is this happening?

Some extra info:

Here you can see it evaluates to a “missing value”:

Screen Shot 2021-01-15 at 12.28.17 pm

And here you can see the “more” for the Facebook pages API call is empty, so theres’ nothing else I can do further with the data:

Screen Shot 2021-01-15 at 12.28.24 pm

This is what the Facebook pages API call looks like when I initialise it:

What do you want to display in the RG?
Don’t forget that it’s need to be a list. So you will need to set type on (Facebook Pull pages (data) response
And also select this in the Data source.
Actually you seem to select full payload, but this doesn’t seem to be a list.

I want each cell of the repeating group to be a singular Facebook page. Each Facebook page contains data like name, picture, url etc. That way I can display the name and profile pic in each cell.

I have tried the following which I think is what you’r suggesting:

  1. When initialising the call I set the “request” (list) to the JSON component containing the list of facebook pages to “Facebook - Pull Pages (data) response result data entry”, as shown below:

  1. In the repeating group I have set the Type of Content to “Facebook - Pull Pages (data) response result data entry”. That is the list configured in the step above. So now the Repeating Group type is a list.

Screen Shot 2021-01-15 at 2.29.23 pm

  1. For the Data Source of the Repeating Group I am still using “get data from an external API” and it is set to “Facebook - Pull Pages (data)”. I cannot set this to the list “Facebook - Pull Pages (data) response result data entry” as defined in step one because that option does not appear.

Is that what you were suggesting?

Unfortunately nothing changed, I am still having the same problem.

Ok just got it!

I think I had to refresh the editor for the new list to work in the editor?

Whatever the case, the problem is now solved :slight_smile:

Thanks for the help!

1 Like