Does anyone know why my filtJobList function isn't updating?

fae

Joined
Feb 24, 2024
Messages
1
Reaction score
0
var jobList = getColumn("US Workers with Disabilities", "Job type");
var workList = getColumn("US Workers with Disabilities", "Total workers in the US");
var ambulatoryList = getColumn("US Workers with Disabilities", "Percent of workers with Ambulatory difficulty");
var hearingList = getColumn("US Workers with Disabilities", "Percent of workers with Hearing difficulty");


var filtJobList = [];
var filtPercentList = [];
var index = 0;


onEvent("screenJobs", "click", function( ) {
setScreen("jobs");
});

onEvent("percentDisabilitys", "click", function( ) {
setScreen("percentDisability");
});
onEvent("jobScreen", "click", function( ) {
setScreen("jobs");
});

onEvent("Disability", "click", function( ) {
setScreen("percentDisability");
});

onEvent("return", "click", function( ) {
setScreen("home");
});
onEvent("jobScreen", "click", function( ) {
setScreen("jobs");
});
onEvent("returnHome", "click", function( ) {
setScreen("home");
});


onEvent("filterDisabilty", "click", function( ) {
calculatePercentage();
});




function findJobs(selectedColumn) {
var jobDropdownSelect = getText("jobDropdown");

console.log("dropdownValue:", jobDropdownSelect);

// Clear the previous results
filtJobList = [];

for (var i = 0; i < jobList.length; i++) {
if (jobList == jobDropdownSelect) {
appendItem(filtJobList, selectedColumn);

}
}

console.log("Filtered List:", filtJobList);
console.log(selectedColumn);
console.log(jobList);

setProperty("outputJobNumber", "text", "The amount of people in this job is " + workList.length);
setImageURL("jobImage", "http://tinyurl.com/3fvj8zu3");

return filtJobList;
}

onEvent("Filter","click", function(){
findJobs();

});
 

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top