Created
May 31, 2018 20:10
-
-
Save cgillis-aras/1de551dcfd21f8bf0b2bbedd41a66186 to your computer and use it in GitHub Desktop.
Example of how to filter by a list of IDs in an onSearchDialog event in Aras Innovator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inn = this.getInnovator(); | |
var ident = inn.newItem("Identity", "get"); | |
var or = ident.newOR(); | |
// Search for our Admin Identities... | |
var and1 = or.newAND(); | |
and1.setProperty("name", "%Admin"); | |
and1.setPropertyAttribute("name", "condition", "like"); | |
and1.setProperty("is_alias", "1"); | |
// ... and also search for Super User | |
var and2 = or.newAND(); | |
and2.setProperty("name", "Super User"); | |
and2.setProperty("is_alias", "1"); | |
ident = ident.apply(); | |
// Get an array of IDs that match our criteria | |
var idArray = []; | |
for (var i = 0; i < ident.getItemCount(); i++) | |
{ | |
idArray.push(ident.getItemByIndex(i).getID()); | |
} | |
// Pass those IDs into our query | |
inArgs.QryItem.item.setAttribute("idlist", idArray.join(",")); | |
return; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// EmpListing.js
import React, { useEffect, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
// Dropdown component code from the previous response
const EmpListing = () => {
const [empdata, empdatachange] = useState([]);
const [searchInput, setSearchInput] = useState("");
const navigate = useNavigate();
}
export default EmpListing;