# Missing values when only passed to component

**URL:** <https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887>\
**Category:** Bug reports\
**Tags:** ui\
**Created:** [June 6, 2025, 7:19am UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887 "2025-06-06T07:19:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcus.rognes](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@marcus.rognes](https://community.appfarm.io/u/marcus.rognes)\
**Post date:** [June 6, 2025, 7:19am UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/1 "2025-06-06T07:19:50Z")

</div>

Hi

I am using a custom component in a tree / recursive iterating container  
In this component I accept RecursionLevel as a parameter to set some paddings based on how it is nested in the tree structure.  
This value only exists if it is also used somewhere outside of my component, if I only pass it to the component, it is undefined in my functions, if I use it outside of the component as well, it magically works.

Marcus

---

<div class="post-metadata">

**Author:** ![ErikAKSkallevold](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/erikakskallevold/32/1378_2.png) [@ErikAKSkallevold](https://community.appfarm.io/u/ErikAKSkallevold)\
**Post date:** [June 10, 2025, 3:49pm UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/2 "2025-06-10T15:49:12Z")

</div>

Hi, this looks like a bug,

I was able to replicate this is an internal environment.  
I have made an bug request regarding this.

// Erik

---

<div class="post-metadata">

**Author:** ![Oystein\_Selbekk](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/oystein_selbekk/32/1677_2.png) [@Oystein\_Selbekk](https://community.appfarm.io/u/Oystein_Selbekk)\
**Post date:** [June 11, 2025, 8:22am UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/3 "2025-06-11T08:22:37Z")

</div>

Would like to pitch in another percieved bug related to a component and datasources.  
I am sending in a question object. In the component we want to iterate over all the answers to this question. We use a datasource from outside the component and set up a filter stating something like this: All answers where questionID=question.ID (component parameter). The perceived bug is that this iteration always returns ALL the items in the datasource no matter what the value of question.ID is. However, if I swap out the question.ID component parameter with using an external datasource for ex. viewpropertyX.selectedQuestion and use that in the filter, the filter works as it is suppose to. It seems to me that component parameters does not work when using filters on datasources outside of the component.  
Hope this can be fixed 🙂

Øystein

---

<div class="post-metadata">

**Author:** ![ErikAKSkallevold](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/erikakskallevold/32/1378_2.png) [@ErikAKSkallevold](https://community.appfarm.io/u/ErikAKSkallevold)\
**Post date:** [June 12, 2025, 7:31am UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/4 "2025-06-12T07:31:38Z")

</div>

Hi,

Does your setup look like this?  
Here “Bedriftsbruker” can be connected to a “Bedrift”. So I have made a custom component with “Bedrift (one)” and “Bedriftsbruker (many)” as component params.

Inside the Shareable Component, I have made an iterating container, iterating over the “Bedriftsbruker”, with a filter set to “Bedriftsbruker.bedrift === bedrift”

 ![SC setup](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/0/0550c9dffee931fda7aa6dd806f85dd2161c5516.png)  
 ![Shareable component](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/9/98f388c3d5bc6e1c01f2d242eb4a464a59d9666f.png)  
 ![Filter on iterating container](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/6/6e9964e5a8783e927c84cc04991716303ceae5ee.png)

That seems to work in my case (117.0).  
Of the ~1600 elements, only 2 are visible, which matches with the data and filter.

 ![Result](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/7/7998f52621e60627e4f8d12f23356349c8df6f0f.png)

Please reach out if that isn´t your case.

// Erik

---

<div class="post-metadata">

**Author:** ![Oystein\_Selbekk](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/oystein_selbekk/32/1677_2.png) [@Oystein\_Selbekk](https://community.appfarm.io/u/Oystein_Selbekk)\
**Post date:** [June 12, 2025, 9:26am UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/5 "2025-06-12T09:26:47Z")

</div>

Hi Erik and thank you for this. Our case is slightly different. The component param is only Bedrift (one), and the component will iterate on Bedriftsbruker (many) which is a datasource from the outside of the component. When you then try to iterate over Bedriftsbruker (many) inside the component based on a filter where Bedriftsbruker (many).Bedrift === Bedrift (one), the filter does not seem to work and the iteration returns all the Bredriftbruker (many) records despite the fact that some of them are not related to Bedrift (one).

Øystein

---

<div class="post-metadata">

**Author:** ![ErikAKSkallevold](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/erikakskallevold/32/1378_2.png) [@ErikAKSkallevold](https://community.appfarm.io/u/ErikAKSkallevold)\
**Post date:** [June 12, 2025, 4:28pm UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/6 "2025-06-12T16:28:59Z")

</div>

I see, using that setup, it does not seem to filter.

Will register a bug request for this too.

// Erik

---

<div class="post-metadata">

**Author:** ![Oystein\_Selbekk](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/oystein_selbekk/32/1677_2.png) [@Oystein\_Selbekk](https://community.appfarm.io/u/Oystein_Selbekk)\
**Post date:** [June 12, 2025, 7:41pm UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/7 "2025-06-12T19:41:53Z")

</div>

Great. Thank you 🙂

Øystein

---

<div class="post-metadata">

**Author:** ![Olav](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/olav/32/63_2.png) [@Olav](https://community.appfarm.io/u/Olav)\
**Post date:** [August 29, 2025, 7:01am UTC](https://community.appfarm.io/t/missing-values-when-only-passed-to-component/1887/8 "2025-08-29T07:01:23Z")

</div>

Hello!

Both bugs reported in this thread have been fixed in [release 120](https://community.appfarm.io/t/release-notes-120/1987).
