Skip to main content

Posts

Showing posts with the label Form

Handle Loading Spinner Visibility in Aras Innovator

When opening Item window, a loading spinner shows automatically like below figure. In some cases, manually handle its visibility would be a necessary process to prevent user do any operation. Show Loading Spinner aras.browserHelper.toggleSpinner(document,true); Hide Loading Spinner aras.browserHelper.toggleSpinner(document,false);

Control Property Access with Identity in Aras Innovator

In Aras Innovator, each ItemType links to a table in database. That means the Property links to a column for storing data. If there are access issues for data field, create a Poly Item and Form with particular Identity should be the simplest way to implement. When facing to complicated scenario (maybe various columns and Identity need to be considered together), the future maintenance work might be very difficult. This article provides another thinking to achieve similar result with a little customization. Change Property Access The Property is also an ItemType in system, that means its access can be controlled by system permission. In default, a Relationship will inherits permission from its parent. But in order to control Property access individually, the "Use Src Access" option should be cancelled (see Figure 1). Figure 1 Create Private Permission Open the ItemType which need to create various view (here takes "Part" as example), and follow below s...

Control Relationship Tabs in Aras Innovator

According to this article , Relationship tabs are indexed with RelationshipType ID. That means RelationshipType ID is Relationship tab ID. And also, Relatioship tabs are a part of Item window. Therefore, the first step is to get Item window reference. it could easily get with below code: var thisWnd = aras.getMostTopWindowWithAras(window); Enable/Disable Use below code can enable/disable a tab. The parameter "Enabled" is a Boolean, the tab will be disabled if passing false. thisWnd.relationships.relTabbar.SetTabEnabled( RelationshipType ID , Enabled ) Visibility Use below code can control the visibilty of a tab. The parameter "Visible" is a Boolean, the tab will hide if passing false. thisWnd.relationships.relTabbar.SetTabVisible( RelationshipType ID , Visible ) Remove Use below code can remove a tab, but this action is irreversible. thisWnd.relationships.relTabbar.RemoveTab( RelationshipType ID , Item Type )

Create Tab Layout for Form in Aras Innovator

This article will introduce how to create tab layout for Form like below Figure 1 and able to trigger function while clicking a tab. Figure 1. A tab layout in Form Figure 2. Trigger a function while clicking a tab Create a HTML Field in Form with clicking the icon marked in Figure 3. Figure 3. Create HTML Field In "Field Type", paste below code to "HTML Code". And then, save Form. The function "onClick" mainly defines the action while tab is clicked. <script type="text/javascript"> var tabApplet; clientControlsFactory.createControl("Aras.Client.Controls.Experimental.SimpleTabbar", {style: 'width: 400px; height: 200px;'}, function(control) { tabApplet = control; //Set tabs tabApplet.addTab('tab1','Tab 1'); tabApplet.addTab('tab2','Tab 2'); //Set tab content tabApplet._getTab('tab1').setContent('This is Tab 1.'); tabApplet._getTab(...

Item Window Render Process in Aras Innovator

Item window is a typical way to display item data, this article is to investigate the render process of it. And then, check the trigger timing of "onFormPopulated" and "onLoad". When user open an item, Window Render Process (see Figure 1) will be executed. There is an action "render" which mainly handles form details (see Figure 2), here calls Form Render Process. When HTML elements are loaded, system will trigger form event "onFormPopulated" if it exists. After Form Render Process finished, system will trigger form event "onLoad" if it exists, and then Window Render Process is finished. But if user save/lock/unlock an item, system will only execute Form Render Process. With above points, the trigger timing and main difference between "onFormPopulated" and "onLoad" are clear: onFormPopulated: execute every time while item window update form data. onLoad: execute only one time while item window opened. ...

Item Window Layout in Aras Innovator

Every time open an item in tab view mode will append an iframe object (hereinafter referred to as window) to body. At the same time, window will be assigned an unique id which consists of opening time and item's id for identifying. Window layout is defined as below picture. If there are many relationship tabs, they will be stored in "iframesCollection" inside relationships window and indexed by RelationshipType's ID. For example, the ID of "Part BOM" is "159C6D88795B4A86864420863466F728"; therefore, the "BOM" tab could be accessed by below code. window.relationships.iframesCollection['159C6D88795B4A86864420863466F728']