How to Get an Item From a Data Collection with WiX Code | WiX Data API - .get() Method | Velo

preview_player
Показать описание
In this series I walk you through the long await WiX Data API!

The WiX Data API allows you to interact with data collections using code (Velo). With just a few lines of code you can get, add, remove or update items in your collection. You can also do more complex things such as querying a collection based on a certain field - value pair, using hooks to take action before or after a collection is changed and more!

In this video I talk about the .get() method with lets you retrieve an item from a collection using the item id.
See the full documentation here:

New to Velo? Try my new Velo for Beginners course:

Have an idea for a video? suggest it here:

Have questions? Join the discussion:

Want to have joint coding session? Book one now:

Have questions? Need some magic done on your website ASAP?

Follow along on Twitter @thewixwiz
Рекомендации по теме
Комментарии
Автор

Hi tested this, and noticed it works for items in the collection are the "visible" but it produces a null value when the item is "hidden." the collection I'm testing this with is tied to dynamic pages. Is there an adjustment we can make to include hidden items in the function?

joannkol
Автор

would it be possible to do the same? but instead of using the id that wix provides, i create a separate field and make it primary called "userID"?

walkthroughonthego
Автор

How do I do this for a new item rhatbiabadded to a collection rather than a specific ID

Intranetinsights
Автор

Can't get this to work. There are missing steps to setting up the page which the vide shows as set up with a name field but does not explain. Is it a dynamic page? Does the collection need to be connected? How?....

RaymondWarren-qwsq
Автор

how can i get the ID of an item to vary depending on the item displayed on the page (dynamic page)?

RudeRumourPS
Автор

hi, i have one question how can i get data with someother field instead of _id?

ifampk
Автор

How can I look for someone for lets say a certain name in the CMS like if name is the same blank

asega
Автор

I've been trying to connect a dropdown to a collection only through wix code so I can change the default value on click. How do I do that...? I've been searching forever for this solution. Every time I cross someone who has ".option" or ".setOption" in their code, mine won't take that. Losing my mind here. It's such a simple thing, can't figure it out.
:(

SennaCrow
Автор

hi how do Display a Different image every hour from a Collection data base on my home page which is a regular page not a dynamic page ive set up collection with time in the field and connected it to data set but nothing seems to happen please help me my friend as something i thought would be really easy to do is driving me mad

slypaul
Автор

can you please do a post request to create a member using only email?

NODNyNy
Автор

I'm getting a null value when trying to search using email. How can I correct this?

FubuDon
Автор

This code didnt work for me. I'm not sure why. I am trying to get a text box to display a specific item's title

TonkaJahari
Автор

I want to get products collection created by stores app of wix.

arkthespark
visit shbcf.ru