To set up your Application Action in UNE go to Data Rules Editor > Application > Application Actions.

 

 

 

// Run Select
// $action.[parameterName] - these are parameters you can input when calling the action elsewhere in UNE
var proposedSites = Filter(FeatureSetByName($map, "<LAYER NAME"), `liveparentid = '${$action.uneid}'`);

return {
    command: "select",
    method: "new",
    layers: [{
        layerName: "<LAYER NAME>",
        graphics: proposedSites
    }]
};

To call your application action in other areas of UNE you can use the following:

  1.  
var paramValue = "{Example Value}"; // This is the value to pass into the action.

return {
    command: "run-action",
    name: "myActionName", // This is the name of the action, set up when action is set up.
    params: {
        uneid: paramValue // Name of the parameter created when setting up the action.
    }
};

Or if embedded in HTML:

var paramValue = "{Example Value}";

var command = EncodeHtmlAttribute(text({
    command: "run-action",
    name: "myActionName",
    params: {
        uneid: paramValue
    }
}))

var html = {
    content: `
    <a class= "btn" 
        data-run-commands="${command}">
        Select Proposed Feature.
    </a>
    `,
    display: "embed"
};

return html;