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
<!-- Use this query to get all documents with no file attached --> | |
<AML> | |
<Item type="Document" action="get" select="item_number"> | |
<has_files>0</has_files> | |
</Item> | |
</AML> | |
<!-- Use this query to get all documents with a file, but not a PDF --> | |
<AML> | |
<Item type="Document" action="get" select="item_number"> |
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
function doubleClickHandler(result, type_of_action) { | |
if (type_of_action == "doubleclick") { | |
// Do something with the result. In this example, we'll just print out the ID | |
if (result.item) { | |
var type = 'Part'; | |
var itmID = result.item.getAttribute("id"); | |
alert("Got " + type + " with ID: " + itmID ); | |
} | |
return false; // Return false, so the dialog doesn't close | |
} else { |
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 Filter = {}; | |
/* | |
* This filter will apply to the "state" column | |
* filterValue: The value to be pre-loaded when the search dialog is opened | |
* isFilterFixed: Whether the user can change this value after the dialog is opened | |
*/ | |
Filter["state"] = { filterValue: "Released", isFilterFixed: true }; | |
return Filter; |
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
Innovator inn=this.getInnovator(); | |
// *** Express ECO ********************************************************* // | |
Item hd= inn.newItem("Express ECO","get"); | |
hd.setID(this.getID()); | |
hd.setAttribute("select","item_number,title,eco_type,team_id"); | |
hd = hd.apply(); | |
// *** Email From ********************************************************** // | |
Item innAdm= inn.newItem("User","get"); | |
innAdm.setAttribute("select","first_name,last_name,email"); |
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
Innovator inn = this.getInnovator(); | |
// Get all generations of all Parts | |
Item parts = inn.newItem("Part", "get"); | |
parts.setProperty("generation", "0"); | |
parts.setPropertyAttribute("generation", "condition", "gt"); | |
parts.setAttribute("select", "id"); | |
parts = parts.apply(); | |
// Create a list of all of the IDs of all Parts |
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
/* | |
This code is adapted from the hide tabs code at the gist below. | |
https://gist.github.com/EliJDonahue/521dea1dc20a069c13ba356f4142283f#file-aras_labs_hide_tabs-js | |
The intention of this code is to check if a relationship grid is loaded in an OnLoad event. | |
*/ | |
var tabbar; | |
var desiredTabId; |
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 vlt = top.aras.vault; | |
var srcId = this.getID(); | |
var parentItm = this.node; | |
vlt.selectFile().then(function (fileObject) { | |
var d = aras.IomInnovator.newItem("Document File", "add"); | |
d.setProperty("source_id", srcId); | |
d.setFileProperty("related_id", fileObject); | |
d.apply(); | |
top.aras.uiReShowItemEx(srcId, parentItm); // Refresh the window, so the new relationship is shown | |
}); |
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
/* | |
* This will be called from a custom CUI shortcut when the user presses CTRL+A. | |
* It will select all of the items in the grid from the Main Window | |
*/ | |
// Get all selected items, so we don't unselect them | |
var workFrame = this.work; | |
var selectedIds = workFrame.grid.getSelectedItemIds(',').split(','); | |
var rowNum = workFram.grid.getRowCount(); |
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
Innovator inn = this.getInnovator(); | |
// We only want this to run for Innovator Admin, so we're passing in the ID of the admin User | |
string aml = "<AML>" + | |
"<Item type=\"Part\" action=\"unlock\" where=\"[part].locked_by_id = '30B991F927274FA3829655F50C99472E'\">" + | |
"</Item>" + | |
"</AML>"; | |
Item res = inn.applyAML(aml); | |
return this; |