External collection fields with zero/empty string won't be added to collection

I was adding a new external collection to my Adalo project. It is the first time I added an external collection that had some API values that were zero or empty strings.

When I setup the external collection and did the “Run Test” I saw all the JSON items, even though some of them had a zero value or empty value.

Any field that had a zero or empty value was not added to the External Collection list on the left navigation area of Adalo. Because of this, those fields could not be used in the app.

The solution for me was to prefill the returned API data with some value so it shows up in your External Collection list.

Let me know if I may have messed something up or if this is expected behavior. Thanks!

@sstava Yes, this is currently the expected behavior.

1 Like

So to confirm, if any of the response records contains a property which has an empty value, then the property is not shown in Adalo for the external collection? In this example, I don’t see the distanceToPoint property in Adalo after clicking “Save Collection”.

[
  {
    "name": "Andrew",
    "___class": "Users",
    "suburb": "Booragoon",
    "distanceToPoint": 0
  },
  {
    "name": "Barry",
    "___class": "Users",
    "suburb": "Ardross",
    "distanceToPoint": 908.1228945948093
  },
  {
    "name": "Ian",
    "___class": "Users",
    "suburb": "Palmyra",
    "distanceToPoint": 5388.785837419914
  }
]

If that is the case, then I’m not sure I understand why this is expected behaviour.

Thanks

1 Like

No, just the first one.

If you sort on a dummy field to get one of the others to the first item it works.

I don’t understand the thinking behind it either, but have had a “we are aware of this bug” from support.

1 Like