Join the Webstudio community

Updated last month

Mapping question

At a glance
I am close to mapping my database but I am hitting a snag:
It keep forcing me to select a row instead of the column. I tried all of the get commands with no luck:
https://bika.ai/help/openapi/apitable#tag/Record/paths/~1datasheets~1:databaseId~1records/get

So is there a way to make the [0] in the parameters a variable?
Attachment
image.png
f
O
24 comments
Everything is saying one :/
Attachment
image.png
you want to use records array as a collection data, collection will iterate on it and provide each item to the children which are your individual items
I tried this but here's what I get
Attachment
image.png
you need to share the builder url
you are using cms data variable here instead of the item, cms data contains all items array
Attachment
image.png
fixed it for you
Thanks but what was fixed exactly? Still getting the same error
I'm seing cms.data.data.records....what should it be?
seems like it was reverted, maybe by you, I don't know
doing it again now
this is the status quo
Attachment
image.png
on heading
Attachment
image.png
this is what I just set
Attachment
image.png
I reloaded to verify it was saved - it was.
Thanks but the idea is to get the items from the Get API
I'm trying to have the items one, two, three that I have taken from my back end
With CMS.data.data.records[0].fields["Single Line Text"] I get "one. one, one"
and with CMS.data.records (In the tutorial they say to stop before the 0, I get this
then you need to use collection on records and then inside collection access each item
whenever you want to access array items - use a collection as a way to iterate over array
Thanks, I think I'm giving up with this. Nothing is as simple as the tutorials make it out to be. πŸ™ thanks again
I would recommend watching tutorials and doing it after the tutorial exactly as they show it, so you first get something working and understand how it works before you jump into more advanced use cases that do something different
This is generally not hard once you understand how it works.
Add a reply
Sign up and join the conversation on Discord