Please help me
Not sure what you were trying to do with the filter when there already in a list for you, so i removed the first kept the second, and since all the data has 50 columns of reference i used the positions length array to allow the selection of the proper random number
var positionList = getColumn("Top 50 USA", "Position");
var songList = getColumn("Top 50 USA", "Track Name");
var artistList = getColumn("Top 50 USA", "Artist");
var popularityList = getColumn("Top 50 USA", "Popularity");
// var filteredSongList = [];
// var filteredArtistList = [];
// var filteredPopularityList = [];
onEvent("getButton", "click", updateScreen);
function filter2() {
var randomnumber = randomNumber(1, 50);
if (randomnumber < 15) {
setProperty("changeImage", "image", "download1.png");
} else if ((randomnumber < 30)) {
setProperty("changeImage", "image", "4472584.png");
} else {
setProperty("changeImage", "image", "purepng.com-music-iconsymbolsiconsapple-iosiosios-8-iconsios-8-721522596085b6osz.png");
}
}
// function filter() {
// for (var i = 0; i < positionList.length; i++) {
// if (positionList[i] == randomnumber) {
// appendItem(filteredSongList, songList[i]);
// appendItem(filteredArtistList, artistList[i]);
// appendItem(filteredPopularityList, popularityList[i]);
// }
// }
// }
function updateScreen() {
filter2();
var index = randomNumber(0, positionList.length-1);
setText("popularityTextArea", popularityList[index]);
setText("artistTextArea", artistList[index]);
setText("songTextArea", songList[index]);
}