# Set property depending on clicked element inside each loop

**URL:** <https://forums.fusetools.com/t/set-property-depending-on-clicked-element-inside-each-loop/4202>\
**Category:** How-to Discussions\
**Created:** [February 3, 2016, 9:34am UTC](https://forums.fusetools.com/t/set-property-depending-on-clicked-element-inside-each-loop/4202 "2016-02-03T09:34:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oskar](https://avatars.discourse-cdn.com/v4/letter/o/f07891/32.png) [@oskar](https://forums.fusetools.com/u/oskar)\
**Post date:** [February 3, 2016, 9:34am UTC](https://forums.fusetools.com/t/set-property-depending-on-clicked-element-inside-each-loop/4202/1 "2016-02-03T09:34:35Z")

</div>

Can this be done somehow?

```auto
<Text Value="{Property self.SelectedOption}" />
<Each Items="{options}">
    <Panel Padding="80,10,0,10">
        <Clicked>
            <Set self.SelectedOption.Value="{title}" />
        </Clicked>
        <Text Value="{title}" />
    </Panel>
</Each>

```

When one of the Panels inside Each loop is clicked, I want to get the title of that clicked element and change the Text element on the top outside the loop. But instead of the title property, I get “{title}” set.

Without JS, can this be done in UX?

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [February 3, 2016, 1:14pm UTC](https://forums.fusetools.com/t/set-property-depending-on-clicked-element-inside-each-loop/4202/2 "2016-02-03T13:14:53Z")

</div>

Hi,

For logic like this, it is recommended to use JS.

However, the fact that you got the string `{title}` instead of the value of the binding sounds like a bug. I’ve filed an issue to get this investigated. Thanks for bringing it to our attention!

---

<div class="post-metadata">

**Author:** ![oskar](https://avatars.discourse-cdn.com/v4/letter/o/f07891/32.png) [@oskar](https://forums.fusetools.com/u/oskar)\
**Post date:** [February 4, 2016, 6:58am UTC](https://forums.fusetools.com/t/set-property-depending-on-clicked-element-inside-each-loop/4202/3 "2016-02-04T06:58:03Z")

</div>

Thanks to you !
