item data updates in repeater but repeater data does not

So, maybe i am going about this the wrong way but… I am populating a repeater with a query. I have a radioGroup inside the repeater. What I would like is for after the repeater is populated, users can click on the choices in the radioGroup, then after there done I will pull the repeater data from the repeater to use to with a wixData insert. I do not want to add another dataset to the page due to loading performance and there is already a dataset on the page. So I have the repeater populating correctly, and then when I click the radio box and retreive the item.Data it shows up with the select Value in the item, but if I pull up the repeater.data the property is “”. Any help would be greatly appreciated.

export function button4_click(event) {
	let classData = $w("#classes").data;
	let exhibitor = classData.Exhibitor;
	let classDataItems = classData.items;
	$w("#classes").forEachItem(async ($item, itemData, index) => {
		itemData.Exhibitor = $item("#radioGroup2").value;
		console.log(itemData)
	})

	if ($w("#classes").collapsed) {
		$w("#classes").expand();
		$w("#button4").label = "Collapse";
	} else {
		$w("#classes").collapse();
		$w("#button4").label = "Expand";
	}
}

@doug.hammack You need to use the event context if you are trying to manage data inside of a repeater. Repeaters do what their name says, they repeat. So if you have three views in your repeater which one is the button function going to talk to. There is only one function definition right :-).

So the event parameter gives the context you need but you need to translate it into an item scope so that you can access elements in the view holding the button.

Most developers will see you using $w as the item scope and know that you haven’t grabbed the repeater scope (often called $item). Now since you are using $item already I would use the name $scope. So to access the button pressed you need to do this:

$scope = $w.at(event);
let buttonIsCollapsed = $scope(“#button4”).collapsed;

Any other element you need to access inside a repeater view will be accessed using $scope(“#”).

Here’s some info on this: