# Components: Collection ID as parameter to fetch collection with given ID

**URL:** <https://community.weweb.io/t/components-collection-id-as-parameter-to-fetch-collection-with-given-id/6071>\
**Category:** How do I?\
**Created:** [December 22, 2023, 7:17am UTC](https://community.weweb.io/t/components-collection-id-as-parameter-to-fetch-collection-with-given-id/6071 "2023-12-22T07:17:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erbteilung](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@erbteilung](https://community.weweb.io/u/erbteilung)\
**Post date:** [December 22, 2023, 7:17am UTC](https://community.weweb.io/t/components-collection-id-as-parameter-to-fetch-collection-with-given-id/6071/1 "2023-12-22T07:17:25Z")

</div>

Hi,

Just saw the collection id type in the parameters of the new components. But how can we use it?  
I need to fetch a collection in a workflow with the given collection id, but the action fetch collection can’t be bound to a dynamic variable/parameter.

Is there a way to fetch a collection with the collection id?

Tested some stiff with wwLib but didn’t find a solution… there is the wwLib.wwCollection.fetchCollection but how to use it?

Thanks a lot,

Chris

---

<div class="post-metadata">

**Author:** ![erbteilung](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@erbteilung](https://community.weweb.io/u/erbteilung)\
**Post date:** [December 22, 2023, 7:23am UTC](https://community.weweb.io/t/components-collection-id-as-parameter-to-fetch-collection-with-given-id/6071/2 "2023-12-22T07:23:11Z")

</div>

i am stupid =)

wwLib.wwCollection.fetchCollection(“collection\_id”) worked.

But is it save to use for future changes?

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [December 26, 2023, 1:52pm UTC](https://community.weweb.io/t/components-collection-id-as-parameter-to-fetch-collection-with-given-id/6071/3 "2023-12-26T13:52:38Z")

</div>

Hi @erbteilung 👋

Thanks for taking the time to share the solution!

> [@erbteilung](#):
>
> But is it save to use for future changes?

I don’t know. Let me ask the tech team and get back to you on that one 🙂

FYI, we plan on doing a big revamp of the developer documentation in 2024 so these things should be clearer in the future

---

<div class="post-metadata">

**Author:** ![aurelie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/aurelie/32/13249_2.png) [@aurelie](https://community.weweb.io/u/aurelie)\
**Post date:** [January 2, 2024, 9:25am UTC](https://community.weweb.io/t/components-collection-id-as-parameter-to-fetch-collection-with-given-id/6071/4 "2024-01-02T09:25:43Z")

</div>

Hey,  
its one of our public method, so it is safe.  
We may during the revamp rename/move it, but this will be with progressive deprecation warning and guided migration :).

---

<div class="post-metadata">

**Author:** ![erbteilung](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@erbteilung](https://community.weweb.io/u/erbteilung)\
**Post date:** [January 5, 2024, 11:08am UTC](https://community.weweb.io/t/components-collection-id-as-parameter-to-fetch-collection-with-given-id/6071/5 "2024-01-05T11:08:10Z")

</div>

Thank you thats great!
