Is it possible to change color for TGV row/cell based on some conditions
Hi Experts, We have use case to change color of TGV row/cell based on some conditions. We are exploring various options to implement color change in TGV row/cell or at least text color. But not able to get any working solutions. Could you please suggest if it possible to achieve it. If yes, could you please share steps to implement solution. Example: Change TGV cell for rows with State - Released or Change Text color 'Released' to Red/Green82Views0likes0CommentsStrikethrough Invalid Row in Relationship Tab
Attempting to create a client-side javascript method that can highlight / strike-through invalid Part AML relationship rows based on a relationship property (outdated date), when I click the tab. I've been trying to replicate this github link: Sample code to set the color of a relationship row based on property values. · GitHub 2 issues I'm running into: 1. I tried putting the method on a CommandBarSection Builder method like the post says and set location to: ItemView.RelationshipsCommandBar, but can't get the method to fire on tab load. ex. Pressing the AML tab on a Part Form doesn't run the method. 2. Tested whether the method functionality works by adding a button on the relationship command bar to run, but I get an error on the method .SetBGColor (error can't read property_D). I'm trying to apply a strikethrough similar to the one in red-line view. I've looked through the forum and found some links to solutions for similar issues, but they were no longer available. Does anyone have any up-to-date links or solutions? Thanks.31Views0likes0CommentsRefreshing xClass Field on Form in Field Event OnChange
So I wrote a client side method so when you change the Classification of a part, it selects a matching xClassification. This part is working, except the UI isn't updating with the selection of the xClass, so its prompting me to enter the required properties for my xClass, but I can't see them. How do I get the xClass field on my form to update so that it displays my new selection? Several examples used aras.uiReShowItemEx() but that pulls from the database, but the xClass selection has not be saved to the Part yet... so its blank. It looks like form.populate() is the right idea because its not pulling from memory but everything I try returns form as null...188Views0likes3CommentsJavascript Temporary Permissions
Good day all. I'm still using v11 SP10. How do I grant temporary permission for a user through Javascript? I want to add a Comments tab to our custom change ItemType. I have a script attached to an Action to open a dialog box so a user can add a comment. The Submit button runs another script to pull the comments field information and sends it back to the original script. The original script then creates a Comments relationship entry for the change. I have this working except when the change is in the In Review Life Cycle state for normal user, it works for admins. I want to temporarily grant Aras PLM identity to the user so it can be added. I don't want to allow users to be able to edit anything else in the change while it is In Review. Method: DEMO_Notes_Form // Aras Labs Project // Eli Donahue - 10/5/16 // // Call a custom form in a modal dialog // Perform some action based on the values returned from dialog // Aras Labs Project // Eli Donahue - 10/5/16 // // Call a custom form in a modal dialog // Perform some action based on the values returned from dialog var inn = new Innovator(); // var thisItem = document.getThis var topWnd = aras.getMostTopWindowWithAras(window); topWnd = topWnd.main || topWnd; // get form var formName = "DEMO_Change_Notes"; var fetchForm = this.getInnovator().newItem("Form","get"); fetchForm.setProperty("name",formName); fetchForm = fetchForm.apply("get"); // check form for error if (fetchForm.isError()) return alert("Can't find a form called " + formName); // get form params var params = { title: 'Change Notes', formId: fetchForm.getID(), // put your form's id here aras: aras, dialogWidth: 600, // set width int dialogHeight: 400, // set height int content: 'ShowFormAsADialog.html' }; var parentItem = parent.thisItem; var value = parentItem.getProperty("id",""); var userID = aras.getCurrentUserID(); var callback2 = function(res) { var innovator = new Innovator(); var partItem = innovator.newItem("sm_DEMO_NDR_Notes","add"); partItem.setProperty("source_id", value); partItem.setProperty("comments", res.param1); var resultItem = partItem.apply(); } // call form in dialog topWnd.ArasModules.Dialog.show("iframe", params).promise.then(callback2); return null; DEMO_SUBMIT-Notes // Aras Labs Project // Eli Donahue - 10/5/16 // // onClick field event for Submit button // Returns the form field values to the method that called the current dialog // get param1 field var wrapper1 = getFieldByName("comments"); var p1 = wrapper1.getElementsByTagName("textarea")[0]; // confirm fields were correctly retrieved if (!p1) { alert("Can't find field param1"); return; } // return entered values var retVal = {}; retVal["param1"] = p1.value; retVal["param2"] = sourceID; // retVal["searchResult"] = p3.value; parent.returnValue = retVal; parent.close();Solved129Views0likes4CommentsHow can I trigger the classification to update and change forms from a different property?
Hi Aras Community, I have a use case where my classification is technically controlling two things. What type of workflow they are on and what kind of form they see with the ability to switch the different kinds of forms. I'm trying to prevent mistakes from happening by providing 2 drop downs one that shows the workflow type and another that offers the form options. On selecting the form options, I need to update the classification and have the form change to the proper form. My current code updates the classification but does not execute whatever code causes the form to change on the classification update the way it does if you type it in or use the classification dialog box. Below is the code I'm starting with I don't know if there may be an API I can call that does this change or if there is a way to refresh the iframe that I'm not aware of. Any help is greatly appreciated. var inn = top.aras.newIOMInnovator(); var formtype = document.all("form_type").value; var worktype = document.all("workflow_purpose").value; var classification = ""; switch(worktype){ case "New Work": if(formtype = "form1"){ classification = "form1/Create New"; }else{ classification = formtype+"/"+worktype; } break; case "Other Work": if(formtype = "form2"){ classification = "form2/Other Work"; }else{ classification = formtype+"/"+worktype; } break; } window.handleItemChange("classification",classification); window.handleItemChange("form_type", formtype); return this;Solved351Views0likes2CommentsInnovator is not defined Client Side Error
I've got a very simple method that creates a new PR from a button on a TGV. This worked perfectly in V12, but is not working in our V15 instance. Any help would be greatly appreciated! The error message is: The method 'create_PR_from_tgv' failed. Innovator is not defined Client Side Error The code is below: var inn = new Innovator(); var pr = inn.newItem("PR","add"); pr.setProperty("parent", thisItem.getID()); top.aras.uiShowItemEx(pr.node, "tab view", true, true);4.2KViews0likes8CommentsonChange field value does not keep new value when item is saved
Hi everyone, I have an on change event that fires when one of my stock fields are changed, which should change the value of a stock message field. The function I have is able to change the value of the stock message field, but when I save/click done, the value is not updated in the properties. My code: var fMinStock = document.getElementsByName("_minimum_stock")[1].value; var fCurrStock = document.getElementsByName("_current_stock")[1].value; var iMinStock = parseInt(fMinStock); var iCurrStock = parseInt(fCurrStock); var fStockMessage = getFieldByName("_stock_message").getElementsByTagName("input")[0]; var stockMsg = ""; var stockMsgColor = ""; if(iCurrStock < iMinStock){ stockMsg = "Insufficient Stock"; }else{ stockMsg = "Sufficient Stock"; } fStockMessage.value = stockMsg; The onChange in action: When save or done is clicked after onChange: Any ideas on what I might be doing wrong?Solved4.4KViews0likes3CommentsClient side Form function and script not evaluating correctly.
Good day all. TL;DR: I am having trouble getting an onLoad method to reliably print an evaluated value to a field. The form is as follows: Stock message contains: <span id='stock_msg'></span> I have a javascript onLoad method that compares the minimum and current stock: // Create min and current stock variables var minStock = document.thisItem.getProperty("_minimum_stock"); var currStock = document.thisItem.getProperty("_current_stock"); // Bring in HTML field span var field = document.getElementById("stock_msg"); // Create stockMsgValue variable var stockMsgValue = null; // if current stock is less than or equals to minimum stock if(currStock <= minStock) { stockMsgValue = "<p style='color: red'>Not enough Stock!</p>"; } else { stockMsgValue = "<p style='color: green'>Stock levels look good</p>"; } // Write to HTML field span field.innerHTML += stockMsgValue; I did something similar with Stock message 2, but included the javascript in the HTML field directly: <div id="Message"></div> <div id="min"></div> <div id="curr"></div> <script> var divText = document.getElementById("Message"); var divCurr = document.getElementById("curr"); var divMin = document.getElementById("min"); var currStock = document.thisItem.getProperty("_current_stock"); var minStock = document.thisItem.getProperty("_minimum_stock"); if(currStock <= minStock ) { var textVal = "<span style='color: red';>Insufficient</span>"; } else { var textVal = "<span style='color: green';>Sufficient</span>"; } divText.innerHTML += textVal; divMin.innerHTML += "Minimum stock: " +minStock; divCurr.innerHTML += "Current stock: " + currStock; </script> The problem is that it works for a little bit, and then the evaluation does not reflect the correct values. Some examples: Any ideas? ThanksSolved5.7KViews0likes8CommentsWhat courses to do to become Aras developer?
My company is going to be deploying Aras Innovator soon, in a few months. We may have an in-house developer for this and I am very interested in this role. I know basics of JavaScript, made a few websites using React, HTML, and CSS. I was wondering what courses should I be doing to prepare for becoming an Aras developer. Does know advance concepts of JavaScript help? Did anyone do the Developer courses provided by Aras? Basically, what programming concepts, courses, documentations, and other resources will help me step into this role? Thanks!90Views0likes6Comments