- 8.6KViews0likes7Comments
searching for parts that contain an asterisk in Aras Innovator
Is there a way within Aras Innovator to search for Part Numbers that contain the asterisk character? I'm not sure how to search for parts containing the asterisk without the system assuming I am using a wildcard in my criteria. It seems that the results are the same weather "Use Wildcards" is checked or not in the Search drop-down menu. On the advice of a colleague I tried these variants, none of which returned any parts containing the asterisk in their part number: *\* and \* both return every part (>74k parts) * returned just 20 parts but none containing Asterisk character *\ returned the same 20 parts as above *[\*] returned the same 20 parts as above8.4KViews0likes4CommentsCustomize Advance Search on Form
Hi Experts, I am looking for customizing the advance search window on the item form. In Aras for main grid and relationship we have the "Advance Search" option and according to the criteria it shows the result. What i am trying to do is, create the HTML control on the form and show the Advance search future on the form. I will select the criteria on the form and on click of search the result will be added in the relationship tab of same item. I tried many things to do this but not successful yet. Anyone have idea about it? Thanks in advance.7.4KViews0likes5CommentsSearch an item by id across all item types
I sometimes had the problem that I have an ID of an Item within Aras, but I don't know the Item Type that it belongs to. (for example, I find the id in an error log somewhere but it's not clear where it came from.) Since I don't know any direct way of searching an item through all item types, I created an easy search util for that. It consists of a server-side method, a client-side method and a generic action that I can call from the main aras window. This is what the code does: - Ask the user to enter an 32-char ID. - Search through all item types for an item that has this ID - Show the result of the search: the ItemType and the keyed_name of the item that was found - It also asks the user if he/she wants to open the aras tear-off window for that item. Maybe this is helpful for other Aras users as well, so I post the code here (it's the AML that you can use to import as a small package or through AML Studio). Thomas Server side method: <AML> <Item type="Method" id="6FBCE5A606B44A25AD805C1418B88388" action="add"> <comments>Admin action to search for an ID in all ItemTypes</comments> <execution_allowed_to keyed_name="Administrators" type="Identity">2618D6F5A90949BAA7E920D1B04C7EE1</execution_allowed_to> <method_code><![CDATA[var inn = this.getInnovator(); // Validate input var searchId = this.getProperty("search_id"); if (searchId == null) { return inn.newError("Please provide a search_id"); } if (searchId.Length != 32) { return inn.newError("search_id needs to be 32 characters."); } // Search all available ItemTypes var searchForItemTypes = inn.newItem("ItemType", "get"); searchForItemTypes.setAttribute("select", "name,instance_data"); searchForItemTypes.setAttribute("where", "implementation_type='table'"); // ignore polymorphic and federated ItemTypes var allItemTypes = searchForItemTypes.apply(); // In every ItemType, search for the given ID for (int i = 0; i < allItemTypes.getItemCount(); i++) { var itemType = allItemTypes.getItemByIndex(i); var itemTypeName = itemType.getProperty("name"); var tableName = itemType.getProperty("instance_data"); // Search via SQL to avoid any permission problems var sql = "select keyed_name from [" + tableName + "] where id='" + searchId + "'"; var res = inn.applySQL(sql); // If one item is found, return the result. if (res.getItemCount() > 0) { res.setAttribute("type", itemTypeName); return res; } } // No ID found, return error message return inn.newError("ID " + searchId + " not found!");]]></method_code> <method_type>C#</method_type> <name>s_find_element_by_id_server</name> </Item> </AML> Client-side method: <AML> <Item type="Method" id="7CF952DCB88F4EC5A2376E320AFDD05E" action="add"> <comments>Admin action to search for a given ID in any ItemType</comments> <execution_allowed_to keyed_name="Administrators" type="Identity">2618D6F5A90949BAA7E920D1B04C7EE1</execution_allowed_to> <method_code><![CDATA[var inn = this.getInnovator(); // Ask the user for an ID top.aras.prompt("Please enter ID:", "").then( // Callback function after the prompt function (search_id) { if (search_id===undefined) { // User canceled the dialog } else { // Check server for ID var r = inn.applyMethod("s_find_element_by_id_server","<search_id>" + search_id + "</search_id>"); // If server returned an error, show error to user if (r.isError()) { top.aras.AlertError(r.getErrorString()); } else { // If server found an item, show the ItemType and Keyed name of the item, // and ask user if he wants to see the form of the item if (top.aras.confirm("Search for ID: " + search_id + "\n\n" + "ItemType: " + r.getType() +"\n" + "Keyed name: " + r.getProperty("keyed_name") + "\n\n"+ "Do you want to open the form of the item?")) { // open form of item, if requested top.aras.uiShowItem(r.getType(), search_id); } } } } ); ]]></method_code> <method_type>JavaScript</method_type> <name>s_find_element_by_id_client</name> </Item> </AML> Action: <AML> <Item type="Action" id="BAFCB980FF014963B7A6D394774F0D08" action="add"> <item_query /> <label xml:lang="en">Find Element By ID</label> <location>client</location> <method keyed_name="s_find_element_by_id_client" type="Method"> <Item type="Method" action="get" select="id"> <name>s_find_element_by_id_client</name> </Item> </method> <target>none</target> <type>generic</type> <name>s_find_element_by_id</name> </Item> </AML>7.1KViews0likes4CommentsUX - Delete/Change "My*" ItemType default search
Where I'm doing Aras development work I need to put company initials on all our ItemTypes. But, when I go to search ITs there are these pesky behaviours: 1. I always need to delete "My*" and enter the company initials. 2. I still need to click search - and I cannot set "Auto Search" to true as admin user. How would I go about changing or deleting "My*" as a default? Bonus: How to enable "Auto Search" on ITs? UX: To me it is silly to default a search term and still require user interaction to actually run the query. UPDATE: I managed number 2 using root user credentials and AML post. I've confirmed and now ITypes have results right away, as desired. Now, if I could only identify the AML representation to update the IType -> Properties -> name "Default Search"... oh, Properties is a Relationship, right? I'll start there. I got a hint from my Method IType, where I was able to use the GUI to define a default search that works just fine (matching a naming convention for this company "BL". Haha! This works - but you have to be "root", not just "admin":Solved6.6KViews0likes5CommentsHow to add a new icon to the Search Grid? or modify the default simple search
I want to modify the default simple search criteria and to pass the effective date by default. Or I want to add a new icon to the search grid and an event to modify the query on search click. or I can go with Advanced search and saved search but I want to pass the effective date of today's date. how is that possible?Solved6.3KViews0likes2CommentsError in Installing Aras Enterprise Search Agent Service
Hey, I am following the installation guide to install the Aras Enterprise search. I have installed ZooKeepers, Cluster Service and Solr node. While installing the agent service by running ArasESAgentSetup.msi file, it's giving an error stating "Internal server error: Request body exception: "length cannot be negative: -1". It's occurring at the Solr admin settings window. Error Screenshot - Any suggestions? Thanks6.1KViews0likes2CommentsUX - Automatic wildcard - Simple Search
How would I intercept this SOAP query being built to say, "If no ending wildcard, add asterisk." Req URL:[POST] http://localhost/InnovatorServer12/Server/InnovatorServer.aspx ContentType: XML Node name, label, with condition="like" (can't post SOAP request here without converting/encoding html entities). Where, currently (v12sp5), a search term "Product" would not return "Product Management", but the search term, "Product*" would. I believe this wildcard functionality should be built-in/inherent. I'm not the quickest to SHIFT-NUMBER, so maybe that's why it irks me, but also all major search engines support this inherent wild card - so, putting myself in the shoes of someone that just learned to function the interwebz would be confused here, and maybe think something is missing...?Solved5.2KViews0likes2CommentsHow to search for 'Yesterday'?
I want to find all part Items with a created_on date of Today - easy. Now I want to Save this search to the TOC so users can run it daily - not so easy. I am trying to search for "Yesterday" in a date field, using AML. this: <Item type="Part" action="get" page="1" pagesize="200" maxRecords="" returnMode="itemsOnly"> <created_on condition="gt">yesterday</created_on> <created_on condition="lt">tomorrow</created_on> <generation condition="ge">1</generation> </Item> In my OnBeforeGet, I find the value "Yesterday" and substitute it for yesterday's date. this: <Item type="Part" action="get" page="1" pagesize="200" maxRecords="" returnMode="itemsOnly"> <created_on condition="gt">2019-05-02T00:00:00</created_on> <created_on condition="lt">2019-05-02T23:59:59</created_on> <generation condition="ge">1</generation> </Item> If I return this, then I get the error: <SOAP-ENV:Envelope> -<SOAP-ENV:Body> -<SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>String was not recognized as a valid DateTime.</faultstring> -<detail> <af:legacy_detail>String was not recognized as a valid DateTime.</af:legacy_detail> <af:exception message =" String was not recognized as a valid DateTime. " type =" System.FormatException " /> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 1) Can anyone explain how the system checks if the DateTime value is valid? 2) Is there an elegant, reusable way to perform this functionality? I have created a new Item, using an OnGet method to return todays parts, but this is a lot of effort for a relatively simple requirement. It is not reusable and it does not address why the above approach does not work. Many thanks, Martin.4.5KViews0likes1CommentFilter relationship grid rows from code
Hi Experts, I have the requirement that, as per the form property value the relationship content should be shown. I have tried many things but it didnt helped. E.g I have the form property as dept_name and it has value like "Finance" and "Delivery", according to the value of this property, relationship grid should automatically filter the content(rows). In my relationship i have both Finance and Delivery values, If logged in user is from Finance then he should be able to see only Finance related rows and delivery user can see only for Delivery dept. records. Anybody have idea on this? Also is there any way that we can apply the fixed filter in relationship grid on particular property?3.9KViews0likes1Comment