Skip to main content
add language tag for code block for readability
Source Link

The only way I could see doing it is to add an argument in your function for the field name. You have to add it manually to each addvalue call

function addvalue(feat, field) {
    if (feat == 'Yes') {
        features[i++] = field;
    }
}

addvalue($feature.schoolCommGardenQuarter, "schoolCommGardenQuarter");
function addvalue(feat, field) {
    if (feat == 'Yes') {
        features[i++] = field;
    }
}

addvalue($feature.schoolCommGardenQuarter, "schoolCommGardenQuarter");

The only way I could see doing it is to add an argument in your function for the field name. You have to add it manually to each addvalue call

function addvalue(feat, field) {
    if (feat == 'Yes') {
        features[i++] = field;
    }
}

addvalue($feature.schoolCommGardenQuarter, "schoolCommGardenQuarter");

The only way I could see doing it is to add an argument in your function for the field name. You have to add it manually to each addvalue call

function addvalue(feat, field) {
    if (feat == 'Yes') {
        features[i++] = field;
    }
}

addvalue($feature.schoolCommGardenQuarter, "schoolCommGardenQuarter");
Source Link
kenbuja
  • 5.9k
  • 2
  • 19
  • 30

The only way I could see doing it is to add an argument in your function for the field name. You have to add it manually to each addvalue call

function addvalue(feat, field) {
    if (feat == 'Yes') {
        features[i++] = field;
    }
}

addvalue($feature.schoolCommGardenQuarter, "schoolCommGardenQuarter");