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 is to account for the case where this dropdown accidentally gets added to a non-versionable item | |
const isVersionableItemType = options.itemType['is_versionable'] === '1'; | |
if (!isVersionableItemType) { | |
return { hidden: true }; | |
} | |
/* Query for the IDs of all generations */ | |
// Need the config ID to get all generations | |
// TODO: We could skip this step if we can get the config_id from the window, but it's not readily available | |
var configIdQuery = aras.IomInnovator.newItem(options.itemTypeName, "get"); |
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
const itemType = options.itemType; | |
// Open up a classification dialog | |
var param = { | |
aras: aras, | |
isEditMode: true, | |
itemTypeName: itemType.name, | |
class_structure: itemType.class_structure, | |
dialogType: 'classification', | |
selectLeafOnly: true, |
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 relationshipTabInfo = parent.relationships.relTabbar; | |
var currentRelationshipTabId = relationshipTabInfo.GetSelectedTab(); | |
var tabLabel = relationshipTabInfo.GetTabLabel(currentRelationshipTabId); |
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
public string EvaluateDateCalculation(string dateValue) | |
{ | |
string dateFormula = @"(?:([0-9]+)[\s]*([+-])[\s]*)?(TODAY\(\))(?:[\s]*([+-])[\s]*([0-9]+))?"; | |
System.Text.RegularExpressions.Regex dateRegex = new System.Text.RegularExpressions.Regex(dateFormula); | |
System.Text.RegularExpressions.Match dateMatch = dateRegex.Match(dateValue); | |
if (dateMatch.Success) | |
{ | |
System.Text.RegularExpressions.GroupCollection calcGroups = dateMatch.Groups; |
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
string itemTypeName = this.getType(); | |
Item dateProps = inn.newItem("Property", "get"); | |
dateProps.setProperty("data_type", "date"); | |
dateProps.setAttribute("select", "name"); | |
Item sourceIT = dateProps.createPropertyItem("source_id", "ItemType", "get"); | |
sourceIT.setProperty("keyed_name", itemTypeName); | |
sourceIT.setAttribute("select", "id"); | |
dateProps = dateProps.apply(); |
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
string actionName = this.getAction(); | |
string thisMethodName = "labs_CalculateDynamicDate"; // Set this to the name you are using for your method | |
if (actionName == thisMethodName) | |
{ | |
// If we get here, this is being used as a custom action, so switch to a get and return the results of that. | |
this.setAction("get"); | |
return this.apply(); | |
} | |
// If we get here, we are running in a server event, so just return this as normal |
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(); | |
// Check to see if this item is claimed at all | |
if (this.isLocked() == 0) | |
{ | |
return inn.newResult("No one"); | |
} | |
// Query to make sure that we have the locked_by_id property | |
string selectedType = this.getType(); |
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(); | |
// Check to see if this item is claimed at all | |
if (this.isLocked() == 0) | |
{ | |
return inn.newResult("No one"); | |
} | |
// Query to make sure that we have the locked_by_id property | |
Item part = inn.newItem("Part", "get"); |
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(); | |
Item part = inn.newItem("Part", "get"); | |
// Add a Part BOM relationship to this query | |
Item partBom = inn.newItem("Part BOM", "get"); | |
part.addRelationship(partBom); | |
// Shorthand equivalent | |
Item partBom = part.createRelationship("Part BOM", "get"); | |
// Add an Item property to this query |
NewerOlder