Who is using the Aras SQL 'Federation ItemType Sample v3-1' and can share experience?
Hi community, Does anyone of you use the 'Federation ItemType Sample v3-1'? It´s a sample project that can be used to access external SQL database data via federation more easily. It basically contains a configuring ItemType that helps to setup the SQL connection faster, so you don´t have to code anything. As far as I know it´s only available for subscribers, but I think also free-users that don´t use this project can benefit from this discussion. The basic concepts of federation are always the same. I really like the project, cause it´s well designed and works fast and reliable. The project is a excellent foundation for federation. But form my POV there are still a lot of useful features missing (or simply weren´t implemented yet). I am looking for people who also use the project and have some experience with it. Maybe you even have enhanced the feature and want to exchange your ideas? I have done a couple of customization and would be happy to exchange them with other users! Enhancement that I have done myself: Keyed_name support for federated items (by default they just can show the id). Very useful, also my implementation is a bit of a dirty hack. So I am looking for way to solve this one a more professional way. Changed existing search mode to support wildcard search in item keyed_name (it´s an extension to the keyed_name support above) Support for integer search modes like >, <, <=, >= . By default you just can search for 'eq' and 'like' values. Support for maxResults, pageSize in the grid . This way users get better feedback when you have restricted the number of returned results Bug fix that prevents MPP to crash when you use a federated relationship in ItemType 'Part'. Bug fix to prevent item Preview crash when you use a federated relationship Enhancement or knowledge that I am looking for: Support for 'sort accross pages' Date Range search mode Enhancement regarding security, e.g. add some kind of permission system. The current Aras project seems to contain a lot of fields and functions that are just placeholders for future features. Or maybe I just don´t know how to use them? Ideas for enhancements or alternative concepts to do this kind of federation Of course also general feedback is helpful: Do you use the feature? If yes, how? Just for simply display of external data, or do you mix-n-merge? What is your experience regarding federation? Maybe you also know some bugs that occur in certain scenarios that I haven´t noticed so far? If you don´t use the project cause you´re not a subscriber you are also invited to join the discussion! If you are familiar with federation, you maybe also know some way to improve the display and work with external data. I assume similar pitfalls as in the project occur when you write your federation code by yourself. So most of the questions and enhancements should also be relevant for users who use a different concept Would be happy to connect and hear your experience! Every input welcomed! Many thanks already! Angela2.5KViews0likes8CommentsInstalling Aras Innovator and SQL?
I have a question about installing Aras Innovator and setting up the environment. When I checked the installation guide, there was no mention of SQL Server during installation. Please tell me what I should do before installation and what I should do after installation. I believe that Aras Innovator indirectly manipulates SQL. There was a mention of SQL during installation in the Japanese blog. Reference URL aras.com/.../install-2023-releaseSolved0Views0likes5CommentsUsing additional custom indexes in SQL for custom ItemTypes - any best practice tips?
Hi community, for a couple of tables I use additional SQL indexes for performance reasons. I noticed that the SQL ItemType allows us to specify custom indexes too and even contains a few for the most common used ItemTypes. Aras for example typically uses them for versioned ItemTypes like classic Part and CAD. The Aras SQL ItemType has one big advantage -> it´s a visible item that can be exported. Indexes used directly in the SQL database are less obvious to see for admins. I wonder if we should use something similar in our own custom ItemTypes in general. Especially for versioned ItemTypes. Of course SQL indexes are mainly used for performance reasons. There are multiple ways to optimize performance. But has anyone some tips when custom indexes should be considered by default (!) in the context of Innovator? @ Aras: Do you have any official recommendations or guidelines regarding SQL indexes? Many thanks for any hint! Best regards Angela0Views0likes0CommentsHow to use a query to get distinct values from a item table
Community, I have created a staging table capability that will be used to generate innovator eBOMs from Oracle manufacturing BOMs. My challenge is working with 1.7 million rows of data in SQL Server. I know I could create a SQL procedure to get the unique (distinct) oracle Assembly IDs but I would like to use a Query Definition. In the data model below, what is circled in RED is the Oracle Data. What is circled in Blue is where I am separating a 1) [multi-Division, multi-Ora Org, with non distinct Assemblies (by Ora Org)] : stg_Oracle_MfgItem_MfgItem INTO 2) [single-Division, multi-Ora Org, Distinct Primary Assemblies] stg_eBOM_PartBOM_Primary AND 3) [single-Division, multi-Ora Org, Other Assemblies (without Primary PartBOM)] stg_eBOM_PartBOM_Other The goal is as follows: 2) stg_eBOM_PartBOM_Primary will be used to generate the innovator [Part BOM] relationships 3) stg_eBOM_PartBOM_Other will be compared to stg_eBOM_PartBOM_Primary to derive Substitutes So I would like to use a Query Definition to gather all the Distinct Oracle Assembly IDs so I can populate the stg_eBOM_PartBOM_Primary table. Thanks in advance for your time and insight. Scott0Views0likes6CommentsConnecting to Linked Server (External SQL Database)
Hello all, After many attempts and support of Aras Support, we are still unable to execute SQL Stored Procedures on an external SQL database. Context Aras Innovator Version 26 SQL Server 2017 Goal Execute a Stored Procedure on an external SQL server (NOT the Aras SQL server itself) from a C# Server Method. Attempts Making a connection using Microsoft.Data.SqlClient and the legacy System.Data.SqlClient. This involves using a connection string and executing a plain command. Used code: [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:f6796336-b0f8-4284-bca3-4d7d91f97dd5:type=csharp&text=Innovator%20inn%20%3D%20this.getInnovator%28%29%3B%0A%0Astring%20connectionString%20%3D%20%40%22Data%20Source%3DServerName%5CInstanceName%3BInitial%20Catalog%3DDatabaseName%3BUser%20ID%3DUserID%3BPassword%3DPassword%3BConnection%20Timeout%3DTimeoutValue%3B%22%3B%0Astring%20sqlQuery%20%3D%20%40%22Exec%20%5BServerName%5CInstanceName%5D.%5BDatabaseName%5D.%5Bdbo%5D.%5BStoredProcName%5D%20%40Variant%20%3D%20VariantValue%2C%20%40State%20%3D%20%27StateValue%27%2C%20%40ID%20%3D%20%27GUID%27%2C%20%40Test%3DTestValue%3B%22%3B%0A%0A%0Ausing%20%28Microsoft.Data.SqlClient.SqlConnection%20connection%20%3D%20new%20Microsoft.Data.SqlClient.SqlConnection%28connectionString%29%29%0A%7B%0Aconnection.Open%28%29%3B%0A%0Ausing%20%28Microsoft.Data.SqlClient.SqlCommand%20command%20%3D%20new%20Microsoft.Data.SqlClient.SqlCommand%28sqlQuery%2C%20connection%29%29%0A%7B%0Aobject%20result%20%3D%20command.ExecuteScalar%28%29%3B%20%2F%2F%20Executes%20query%20and%20returns%20the%20first%20column%20of%20the%20first%20row%0A%0Aif%28result%20%21%3D%20null%29%0A%7B%0Areturn%20inn.newError%28result.ToString%28%29%29%3B%20%2F%2F%20Logs%20the%20value%0A%7D%0Aelse%0A%7B%0Areturn%20inn.newError%28%22No%20result%20found.%22%29%3B%0A%7D%0A%7D%0A%7D] Result: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Adding the external server as 'Linked Server' to the Aras SQL server. Then using innovator.applySQL() referencing the external database. Used code: [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:4f6ce192-841a-4134-8fa4-3bb5694c5708:type=csharp&text=Innovator%20inn%20%3D%20this.getInnovator%28%29%3B%0A%0Astring%20sqlQuery%20%3D%20%40%22Exec%20%5BServerName%5CInstanceName%5D.%5BDatabaseName%5D.%5Bdbo%5D.%5BStoredProcName%5D%20%40Variant%20%3D%20VariantValue%2C%20%40State%20%3D%20%27StateValue%27%2C%20%40ID%20%3D%20%27GUID%27%2C%20%40Test%3DTestValue%3B%22%3B%0A%0AItem%20response%20%3D%20inn.applySQL%28sqlQuery%29%3B] Result: This makes the browser client crash and we suspect another timeout in the back-end. Question Does anyone have a method (or workaround) to execute SQL on an external SQL server (NOT the Aras SQL server itself) from a C# server method? Best regards, Daan0Views0likes0CommentsLooking for equivalent of SQL select max(property) in IOM
I am looking for the equivalent to select max(property) in IOM. The below SQL query returns exactly what I want, but I understand that this should be used as a last resort and want to make sure I'm not missing something. select MAX(item_number) FROM [InnovatorServer27_Dev_HL].[innovator].[PART] where part.item_number like '1010P%' result: 1010P000002 This is the function within my method that I'm working with. string GetNextBaseNumber(Innovator inn, string PartNumberPrefix) { int BaseNumber = 1; // This query is currently returning a collection when I want it to return the max value Item Part = inn.newItem("Part", "get"); Part.setProperty("item_number", PartNumberPrefix + "%"); Part.setPropertyAttribute("item_number", "condition", "like"); Part = Part.apply(); if (!Part.isEmpty()) { BaseNumber = Int32.Parse(Part.getProperty("item_number").Substring(5,6))+1; } return PartNumberPrefix + BaseNumber.ToString().PadLeft(6, '0'); }Solved0Views0likes2CommentsAras losing data
Hi Team, I am experiencing a serious problem with my one Aras instance. We are losing data in the system, it is just disappearing without a trace. The user would add data, and then checking the next day, it is gone, without a trace, not even in the history file. My gut feeling is that transactions in SQL was being rolled back, without being committed. I pulled a report from SQL and there seems to be rollbacks aligned with the data loss. As part of this Aras instance I am creating a CAD interface in C# .NET. I am exclusively using applyAML() to talk to Aras, I am not using applySQL. Could I be doing something wrong in .NET? Kind Regards RiaanSolved0Views0likes7CommentsC# SQL Date Query
Good day all, I am trying to create a dynamic report to produce the time it take between starting an activity and ending an activity. I can get the information I am looking for by using SQL, but it will not limit the returns based on dates. I have tried a few different ways to do this, but nothing is working for me. Thanks for any help you can provide. [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:ed95bac7-b9b0-4d83-9998-62b7a1797922:type=text&text=StringBuilder%20sql%20%3D%20new%20StringBuilder%28%29%3B%0A%20%20%20%20sql.AppendLine%28%0A%20%20%20%20%20%20%20%20%22Select%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22WP.name%20AS%20change%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22WP.state%20AS%20status%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Act.name%20AS%20activity%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22ClosedBy.keyed_name%20AS%20closed_by%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Act_Assign.created_on%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Act_Assign.closed_on%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Act_Assign.modified_on%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22GETDATE%28%29%20AS%20today%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22DATEDIFF%20%28d%2C%20%5BAct_Assign%5D.created_on%2C%20%5BAct_Assign%5D.closed_on%29%20%2B%201%20AS%20date_diff%20%22%20%2B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%22FROM%20%5BWorkflow_Process%5D%20AS%20WP%20%22%20%2B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%22INNER%20JOIN%20%5BWorkflow_Process_Activity%5D%20AS%20WPA%20ON%20WPA.source_id%20%3D%20WP.id%20%22%20%2B%0A%20%20%20%20%20%20%20%20%22INNER%20JOIN%20%5BActivity%5D%20AS%20Act%20ON%20Act.id%20%3D%20WPA.related_id%20%22%20%2B%0A%20%20%20%20%20%20%20%20%22INNER%20JOIN%20%5BActivity_Assignment%5D%20AS%20Act_Assign%20ON%20Act_Assign.source_id%20%3D%20Act.id%20%22%20%2B%0A%20%20%20%20%20%20%20%20%22INNER%20JOIN%20%5Bsm_Change%5D%20as%20Change%20ON%20Change.item_number%20%3D%20WP.name%20%22%20%2B%0A%20%20%20%20%20%20%20%20%22LEFT%20OUTER%20JOIN%20%5BUser%5D%20AS%20ClosedBy%20ON%20ClosedBy.id%20%3D%20Act_Assign.closed_by%20%22%20%2B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%22WHERE%20WP.name%20%3D%20%27CR-1091%27%20OR%20WP.name%20%3D%20%27CR-1169%27%20%22%20%2B%20%2F%2F%20AND%20Act.name%20%3D%20%27ECR%20Approval%27%20%0A%20%20%20%20%20%20%20%20%22AND%20Act_Assign.modified_on%20BETWEEN%20%272023-08-01%27%20AND%20%272023-08-02%27%20%22%20%2B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%22ORDER%20BY%20WP.name%2C%20Act_Assign.created_on%20ASC%2C%20Act_Assign.closed_on%20DESC%20%22%0A%20%20%20%20%29%3B]Solved0Views0likes7CommentsInnovator SQL Procedures vs. Date Format - how to prevent conversion to American date format?
Hi community, I use an Innovator SQL procedure to get some data that is merged with a second database. The SQL procedure is called from a server Method When I test the procedure in SQL, date properties like modified_on are shown as in correct regular Innovator db format: But the SQL procedure doesn´t return the date in this neutral UTC format to the Server Method. Instead of the shown date in the SQL, I get a converted date that looks like this: 7/13/2002 1:49:27 PM In my case the date is later displayed in a Form, but in my country nobody uses this date format. I am able convert the date into correct DMY-format in C# or SQL. But these steps are unnecessary complicated cause of the American date in between. I wonder why I get the American MDY-date at the first place. I use German locals for Innovator and the server itself. Does anyone know, what can cause dates to be converted to American format when using SQL procedures? Is there away to prevent it? Thanks for any hint! Angela0Views0likes0CommentsHow do I set a where statement on a Query Definition against the current date the query is run?
I want to only have it pull a specific relationship (Part AML) if a custom date field "Valid To" is greater than the current date. I am able to create the Where that compares it against a specific date, but this query definition is pulled by another process automatically and I don't want to have to update the Query Definition every day with the current date for whoever ends up running it that day. I currently have: [Valid to] > '2021-11-29T00:00:00' I want something like (this doesn't work) [Valid to] > current_date()3.3KViews0likes5Comments