Save User choices or Create Default list in Refine button CUI
When clicking the refine button : a list is presented : with already checked values corresponding to the columns (properties) of the presented ItemType. The method responsible of the Init of the button is : cui_common_refine_init Code : Toolbar.extendFormatters({ refine: columnSelectionMediator.cuiToolbarFormatter.bind(columnSelectionMediator) }); return { type: 'refine' }; I would like to know if it's possible to personalize these filters on the search by code or configuration, or associated to user preferences, or saving when checked/unchecked by User ? Everything is already checked and some users would like to be able to have a "default" view. Thanks0Views0likes1CommentTrouble Exporting HTML Table to Excel in Aras Innovator Custom Button
Hello everyone, I've been working on a custom button within the search tab for parts in Aras Innovator. The goal is to export a list of specific parts and their properties through a query and display them in an HTML table. Here's a snippet of the code I'm using to convert the HTML table to Excel and download the Excel file: [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:4ac1465e-c931-489c-a19e-bb242bc1c5f6:type=javascript&text=var%20htmlCode%20%3D%60%0A%3Chtml%3E%0A%3Chead%3E%0A%3Cmeta%20http-equiv%3D%27Content-Type%27%20content%3D%27text%2Fhtml%3B%20charset%3Dutf-8%27%20%2F%3E%0A%3Cscript%20src%3D%27https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fxlsx%2F0.16.9%2Fxlsx.full.min.js%27%3E%3C%2Fscript%3E%0A%3Cscript%20src%3D%27https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2FFileSaver.js%2F2.0.5%2FFileSaver.min.js%27%3E%3C%2Fscript%3E%0A%3Cscript%3E%0Afunction%20substituteTableToExcel%28%29%7B%0Avar%20table%20%3D%20document.getElementById%28%27all_Parts_AML%27%29%3B%0Avar%20sheet_name%20%3D%20%27ALL_Parts_AML%27%3B%0Avar%20workbook%20%3D%20XLSX.utils.table_to_book%28table%2C%20%7Bsheet%3A%20sheet_name%2C%20cellStyles%3A%20true%7D%29%3B%0Avar%20wbout%20%3D%20XLSX.write%28workbook%2C%20%7B%20bookType%3A%20%27xlsx%27%2C%20bookSST%3A%20true%2C%20type%3A%20%27array%27%2C%20cellStyles%3A%20true%20%7D%29%3B%0AsaveAs%28new%20Blob%28%5Bwbout%5D%2C%20%7B%20type%3A%20%27application%2Foctet-stream%27%20%7D%29%2C%20%27ALL_Parts_AML.xlsx%27%29%3B%0A%7D%0Adocument.addEventListener%28%27DOMContentLoaded%27%2C%20function%28%29%20%7B%0AsubstituteTableToExcel%28%29%3B%0A%7D%29%3B%0A%3C%2Fscript%3E%0A%3Clink%20rel%3D%27stylesheet%27%20type%3D%27text%2Fcss%27%20href%3D%27styles.css%27%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%24%7BexcelTable%7D%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%60%3B] return htmlCode; I'm encountering issues with the export functionality. When I click the custom button, the HTML table is generated correctly, but the Excel file download doesn't seem to work. Could someone kindly review the code snippet above and provide any insights or suggestions on how to troubleshoot and resolve this issue? I would greatly appreciate it. Thank you in advance! Version 12.0 SP8Solved0Views0likes2CommentsHow to use CUI Checkboxes and Dropdowns + how get their values from other elements?
Hi Community, I right now play around with CUI CommandBarCheckboxes and CommandBarDropdowns. Does anyone of you have worked with these two elements already? I look for a solution how to get their selected values from another (!) CUI element. CommandBarCheckboxes doesn´t seem to work at all. I have added one to the test case in the picture, but it stays invisible. I've done some research and Aras doesn't seem to have ever used CommandBarCheckboxes in I12 and I14. So probably even Aras hasn´t noticed yet that they don´t work. Fear my testing skills, you can't hide anything! [emoticon:388f399768cb4510bc3d4c26fd6771f6] Anyway. Much more useful than the checkboxes are CommandBarDropdowns and MenuDropDowns. They luckily work quite straightforward and I was able to add one as seen in the picture. When using a click Method, we can get the selection of the dropdown with "const xyz = target.value". But in my case, I want to use the selected option from the dropdown in the click Method at the "CommandBarButton" left to the dropdown. I am able to get the dropdown element itself. But there is right now nothing that could tell me, which value is selected. When I look-up the element in the browser debugger, there is nothing that indicates which value is currently selected Does anyone know more? As alternative idea, we could maybe pass the value in the background. But that´s not my favorite approach. Thanks for any ideas! AngelaSolved0Views0likes2CommentsHow to enforce update of CUI elements in GUI via code?
Hi community, does anyone know a function or Method to force Innovator to re-render the CUI elements? Whenever I create a test-database, I execute a script that changes a few things (especially when the test database is a copy of the main database). E.g. I change the top-left logo to something that strongly indicates that we are in a test database or add some SavedSearches/Favorites to easy track which elements were changed since the test database was created. So basically the script does a lot of CUI changes to optimize the database for testing and cuts a few connections the original database normally would have to the outside world. After I have executed my script, I have to restart Innovator to see the UI changes. I am aware that´s a trivial and extravagant requirement - but it is somehow possible to automate this step? Innovator itself re-renders the TOC when an additional item is added. If we modify CUI elements, at least admins normally see the changes instantly. So there have to be some function that triggers these updates. But I haven´t found them yet. Does anyone know more? Used version is Innovator 12, but I also take a I14+ solution. :D Thanks and best regards! Angela0Views0likes0CommentsHow to update form field from CUI button in item window command bar?
Hi community, has anyone of you ever updated a Form field from a CUI button event from the ItemView.ItemCommandBar (=the main toolbar with the Edit/Done/etc. button when a Form is opened)? I am right now look for some code sample for this use case, but haven´t found the right one yet. I want to move some regular buttons from the Form to the ItemCommandBar cause it better fits the use case. With regular Form buttons updating Form fields is pretty easy. We can use window.handleItemChange("xyz","newValue") to update the fields. But we cannot use the same function from a CUI button in the ItemCommandBar. Does anyone already have a sample Method for this one? Thanks for any help! Angela Edit: thisItem.setProperty("xyz","123"); updates the context item, but it doesn´t do a live update in the Form field. So with the one the new value only appears after the user clicked save. I want to live update the Form with CUI, just like it would do with handleItemChangeSolved0Views0likes3CommentsHow to pass additional custom parameters in Form call?
Hi Community, I want to launch a custom Form from an CommandBarMenu CUI event. Users can select multiple items in the grid and then click the CUI button. Then a form shall open up in which users can do certain operations with the selected items. I want to pass the id´s of the selected items to the launched Forms. But I right now didn´t find an elegant way to pass the idlist or multiple items. I right now create a temporary item, but I am not very happy with the solution. I somehow think that passing custom paramters to Forms should be possible. I just don´t know how. Does anyone of you know a solution? My main problem is not the actual passing of the custom parameters. But I don´t know how to retrive it later. Here´s my current code; var idlist = options.selectedRowsIds; var inn = new Innovator(); // Create temporary item to pass idlist (workaround!) var tempItem = inn.newItem("Part"); tempItem.setProperty("_idlist",idlist); // Launch Form var topWnd = aras.getMostTopWindowWithAras(window); topWnd = topWnd.main || topWnd; var params = { title: 'do something', item: tempItem, formId: "9336D7E4DD244391AEC9593DD8A5D85B"' aras: aras, //innovator: this.getInnovator(), dialogWidth: 1200, // set width int dialogHeight: 600, // set height int content: 'ShowFormAsADialog.html', idlist: idlist <<<<<<<<<---------------------------------------- // is it somehow possible to pass custom parameters with the form to avoid the tempItem? And how to I get it? }; Thanks for any ideas! AngelaSolved3KViews0likes4CommentsAdding a CUI button, getting context item
Hi aras team, I am adding a cui button to the command bar, but random question... How can I get the context item for my method? The usual ways don't seem to apply and I am getting an error: "identifier 'options' has already been declared" the onClick event I setup has attempted to run against document.item, document.thisItem and I also tried parent :/ All the blogs seem to focus on get selected items in a grid, not the active window item.Solved2.7KViews0likes7CommentsInstruction: Hiding the Open in Office Button
Hello everyone, Here is a short instruction on how to hide the Open in Office (Microsoft Office Connector) Button when viewing document items. This can be done without uninstalling / disabling MSO in case you want to prevent users from using the Toolbar Action button. Before: After: This can be achieved by taking these steps: Go to the root \Innovator installation directory of your Innovator instance Navigate to \Innovator\Client\styles Append common.min.css with the following CSS: [data-id="MSO_OpenInOfficeMenuButton"]{display: none!important;} I recommend also updating the regular common.css file with the same CSS but indented Save, clear browser cache and reload the Innovator webpage I hope this helps. All the best from Almelo. Daan1.6KViews0likes3CommentsCustom CUI items in relationships - do I add them in the Parent or Child ItemType?
Hi community, Innovator 12 offers us the new wonderful possibility to use custom CUI elements in relationships. Let´s assume we want to add a custom button to the Part_BOM relationship tab. I know that I have to modify 'Client Style' in the corresponding ItemType. But do I have to do this in Part or Part BOM? 1. When I add my button in the Parent itemtype (Part) and use location 'ItemView.RelationshipsCommandBar' -> will my button be used in all related tabs? 2. When I add the button in the Child itemtype (Part_BOM) -> will it just be used only in the Part BOM tab? I haven´t found any sample for a custom relationship button in Innovator 12 so far. The existing ones are used on a global level. Maybe anybody has tried this already and can share some experience? Does the position have some influence to the Item context? For regular Actions we can choose the context to be Item or ItemType. I wonder if the same can be achieved with CUI elements. But I assume this question is worth an additional thread. Best regards! AngelaSolved3KViews0likes2Comments