# Having trouble setting data source on a repeating group

**URL:** <https://forum.bubble.io/t/having-trouble-setting-data-source-on-a-repeating-group/124673>\
**Category:** Need help\
**Created:** [December 7, 2020, 4:15pm UTC](https://forum.bubble.io/t/having-trouble-setting-data-source-on-a-repeating-group/124673 "2020-12-07T16:15:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom.love1250](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tom.love1250](https://forum.bubble.io/u/tom.love1250)\
**Post date:** [December 7, 2020, 4:15pm UTC](https://forum.bubble.io/t/having-trouble-setting-data-source-on-a-repeating-group/124673/1 "2020-12-07T16:15:38Z")

</div>

Hello, I want to grab the ‘selected cells value’ in one repeating group and write this value to a cell in another repeating group. To accomplish this, here’s what I did:

1. I set the data source of the first RG to “Search for Players”… a data type with two fields (First Name and Last Name).
2. In the source RG I inserted an icon. Clicking this icon triggers a workflow that sets a custom state (at the RG level) called 'Selected cell" (a number) and with a value set to ‘Current cell’s Index’.
3. I then attempted to set the data source of the destination RG to reference the ‘Selected cell’s’ value’. Here is my problem. While the State ‘Selected cell’ evaluates to a number, my expression evaluates to a Player???

Here’s a link to the app:

[https://bubble.io/page?type=page&name=pairings\_worksheet&id=practice201&tab=tabs-1](https://bubble.io/page?type=page&name=pairings_worksheet&id=practice201&tab=tabs-1)

Pics:  
Source RG:

 ![rg1 ds](https://us1.discourse-cdn.com/bubble/original/3X/7/e/7e3f2cd1a69ee04e75649d3ecd1774917d23650f.jpeg)

Workflow:

 ![icon workflow](https://us1.discourse-cdn.com/bubble/original/3X/8/5/852e520f702adc06823ac61d25369e1155cfd7c2.jpeg)

Destination RG:

 ![RG1](https://us1.discourse-cdn.com/bubble/original/3X/9/8/98ba4bb007829a84fa087939359b0af9570347ae.jpeg)

---

<div class="post-metadata">

**Author:** ![jdiaz](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jdiaz/32/76562_2.png) [@jdiaz](https://forum.bubble.io/u/jdiaz)\
**Post date:** [December 7, 2020, 4:56pm UTC](https://forum.bubble.io/t/having-trouble-setting-data-source-on-a-repeating-group/124673/2 "2020-12-07T16:56:47Z")

</div>

On your custom state, change the type from number to Player and click the check mark to make it a list. Then in your workflow, change it from current cell’s index to adding the current cell’s player to the list.

On the destination RG, make the source the custom state list. If you only want one player to be selected at a time, just build additional workflows that remove the old value before adding the new.

---

<div class="post-metadata">

**Author:** ![tom.love1250](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@tom.love1250](https://forum.bubble.io/u/tom.love1250)\
**Post date:** [December 7, 2020, 6:36pm UTC](https://forum.bubble.io/t/having-trouble-setting-data-source-on-a-repeating-group/124673/3 "2020-12-07T18:36:58Z")

</div>

Thanks, jDiaz, for your reply. So I’m not able to get it to work having made the changes you suggested. More importantly, I’m really curious to know why my original logic isn’t working. I followed exactly the example demonstrated by the instructor (Keith Crosley) in this video tutorial at minute mark 24:20.

https://player.vimeo.com/video/289114359

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [February 15, 2021, 4:15pm UTC](https://forum.bubble.io/t/having-trouble-setting-data-source-on-a-repeating-group/124673/4 "2021-02-15T16:15:38Z")

</div>

Closed on February 15, 2021, 4:15pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
