How to add restrictions to aras.vault.selectFile() file picker
Hi community, I currently design a custom form with a button that calls a regular file picker. In my scenario, end users shall only be able to upload certain datatypes, like txt and xml. As the affected users group does not have any edit rights for items, I have to upload the Files to the Vault and link them later to the correct items by a Server Method. As this approach directly throws files into the Vault, I want to ensure that only the right files can go through. What´s the best way to add restrictions to the file picker? var vlt = aras.vault; vlt.selectFile().then( function (fileObject) { if (fileObject.size > 1000 || fileObject.type != "text/xml" ) { return alert("This file can´t be right") } var fileItem = inn.newItem("File","add"); fileItem.setFileName(fileObject); fileItem = fileItem.apply(); var fileId = fileItem.getID(); // do something with the file } ); I have noticed, that the fileObject contains the mime type, file size and other file properties that I can use for a later filtering. It´s even possible to read the hex file signature, which maybe helps to prevent faked files. But I wonder if I can directly pass a filter to the file picker, so users can only select certain file types from the start. This way my lnnovator would not get in touch with invalid fileObjects at all. Thanks for sharing your ideas! AngelaSolved13KViews1like10Comments- 8.6KViews0likes7Comments
How to close relationship search dialog box dynamically?
Hi Team, I have custom result binding code on 'OnSearch' event. On return of result if it is true it works fine but on false I want to close search dialog box that appear in relationship on click of pick related dynamically. I tried following method but it is not working. parent.dialog.close(); Any one can please help how to achieve this? Thanks & Regards Gaurav6.3KViews0likes3CommentsCallback not working properly if I dont have debugger in my javascript code
I have added a popup on button click on the mpp_OperationQuickEdit Form which opens form with a single relationship which I have created.It works like the 'Launch AML Editor' action on MCOs.I have added a save changes button which adds or remove relationships based on relationship added or removed.Then a callback function is provided.the relationships are added or removed successfully but the problem is that the callback works fine if I have put debugger in my javascript code otherwise it just closes both the forms the new popup and the quickEdit form.What could be the problem?6.3KViews1like12CommentsHow to reference the ItemType in the current tab in a Dialog box?
I'm working on a client side method to clone an ItemType using a dialog box. My approach is to make a form with a check box to choose to copy properties and another check box to copy values from a relationship tab, and a button for "Done" and "Cancel." Then opening that form inside a dialog box that's opened from a menu button. My problem is referencing the ItemType in the current tab from the dialog box. I tried adding the item as an argument to the dialog using the 'item' tag, but using document.thisItem returns 'undefined' for me.5.1KViews0likes1CommentCover Page & User Input
Good day all. I could use some advice on creating a cover page for our BOM report. If you have read some of my previous posts, you may know that our database is a bit messed up. I can't change our report. I have created another report and formatted it the way our team has asked for. I can pull all of the information in ARAS into the report. The problem I have is the information that is not in ARAS (or not part of the Parts List). This is what I am trying to accomplish. 1. When the report is ran, a pop-up window will appear to ask for the information that is not part of the Parts List. A. The number of pages in the BOM (user can just add the number, last page of the report) B. Who the Drafter is (without associating a form directly to an ItemType, I don't know how to have the user pick from the User ItemType) C. A Notes section. I tried following 8.1 User Input for Reporting Services-based Reports from the XSLT Report Tool Users Guide (dated 4 Jan 2018). When I run the report a pop-up window appears and I can type in the information I want, but not select the User. When I click on Submit the window disappears & nothing else happens. I'm not sure what I am missing with this. Thanks for any help that can be provided. ARAS v11 SP102.5KViews0likes1Comment