Adalo and external database

Hello everybody

I have a one question about the External collection
I’ve added the collection in my project



But in the Adalo I did’n see any field in this collection

Do you have any idea why?

try adding booking_days as second results key and check. the JSON response seems to be different compared to the others.

Nope
I’ve try to add second results key with booking_days
Try to swap
Nothing helps(

Hi @oper2k,
Have you tried pulling the whole JSON object and not only “booking_dates”? Leaving the Results key empty?

As a remark “booking_dates” is a sort of Json nested/Array, when pulling in list mode, you will only get first result (E.g. 2021-05-19) and not the whole nested list. At least with other APIs, I think this is an Adalo limitation.

Yes, I’ve try it, but Adalo can’t add this external database without any results keys

The full answer is there:

{
“booking_days”: {
“5”: [
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31
],
“6”: [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
]
},
“booking_dates”: [
“2021-05-20”,
“2021-05-21”,
“2021-05-22”,
“2021-05-23”,
“2021-05-24”,
“2021-05-25”,
“2021-05-26”,
“2021-05-27”,
“2021-05-28”,
“2021-05-29”,
“2021-05-30”,
“2021-05-31”,
“2021-06-01”,
“2021-06-02”,
“2021-06-03”,
“2021-06-04”,
“2021-06-05”,
“2021-06-06”,
“2021-06-07”,
“2021-06-08”,
“2021-06-09”,
“2021-06-10”,
“2021-06-11”,
“2021-06-12”,
“2021-06-13”,
“2021-06-14”,
“2021-06-15”,
“2021-06-16”,
“2021-06-17”,
“2021-06-18”,
“2021-06-19”,
“2021-06-20”,
“2021-06-21”,
“2021-06-22”,
“2021-06-23”,
“2021-06-24”,
“2021-06-25”,
“2021-06-26”,
“2021-06-27”,
“2021-06-28”,
“2021-06-29”,
“2021-06-30”
],
“working_days”: {
“5”: [
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31
],
“6”: [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
]
},
“working_dates”: [
“2021-05-20”,
“2021-05-21”,
“2021-05-22”,
“2021-05-23”,
“2021-05-24”,
“2021-05-25”,
“2021-05-26”,
“2021-05-27”,
“2021-05-28”,
“2021-05-29”,
“2021-05-30”,
“2021-05-31”,
“2021-06-01”,
“2021-06-02”,
“2021-06-03”,
“2021-06-04”,
“2021-06-05”,
“2021-06-06”,
“2021-06-07”,
“2021-06-08”,
“2021-06-09”,
“2021-06-10”,
“2021-06-11”,
“2021-06-12”,
“2021-06-13”,
“2021-06-14”,
“2021-06-15”,
“2021-06-16”,
“2021-06-17”,
“2021-06-18”,
“2021-06-19”,
“2021-06-20”,
“2021-06-21”,
“2021-06-22”,
“2021-06-23”,
“2021-06-24”,
“2021-06-25”,
“2021-06-26”,
“2021-06-27”,
“2021-06-28”,
“2021-06-29”,
“2021-06-30”
]
}

How can I get the “booking_dates”? :sob:

Unfortunately the APIs you’re trying are not well defined in my view and that’s causing the issue.

Hi, as @bhanu said, API is not properly built, dates should be in JSON object format:

{
"2021-06-30”
}
and not using [] (this is an array that is just “another” field in the JSON object in a list format (array)). As I mentioned Adalo will only return the first date even if you have access to the field.

If you want, I can check if I can build a custom API for you.

I want of course :heart_eyes:
It will be great

Send me an email to support@adaloshop.com with the details, I will see what I can do. Cheers.

1 Like