get property list from item type, issue reading the result item
hello, i want to get a list of names of propreties that start a certain way 'z%'. i've found aml that was supposed to do it, i' made an iom code to recrate that aml (actually creates the right aml). But what i get is only one item, so i want to know if the aml is actually good or if there is a specific way to get the properties from that one item i get. [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:8336f2cd-196d-4ebb-8979-eeead87b54f9:type=text&text=%3CAML%3E%0D%0A%3CItem%20action%3D%22get%22%20type%3D%22itemType%22%20select%3D%22name%22%20where%3D%22ItemType.name%20%3D%20%27ZFCcontrainteTemplate%27%22%3E%0D%0A%09%3Cname%3Epart%3C%2Fname%3E%0D%0A%09%3CRelationships%3E%0D%0A%09%09%3CItem%20type%3D%22property%22%20action%3D%22get%22%20select%3D%22value%2C%20label%22%20where%3D%22%5Bproperty%5D.label%20like%20%27z%25%27%22%20%2F%3E%0D%0A%09%3C%2FRelationships%3E%0D%0A%3C%2FItem%3E%0D%0A%3C%2FAML%3E] [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:d50be430-1135-40a5-be6a-46672b9d79f9:type=text&text=var%20FCitemType%20%3D%20inn.newItem%28%22itemType%22%2C%20%22get%22%29%3B%0D%0A%2F%2F%20FCitemType.setProperty%28%22name%22%2C%22FCcontrainteTemplate%22%29%3B%0D%0A%2F%2F%20FCitemType.setAttribute%28%22select%22%2C%20%22name%22%29%3B%0D%0AFCitemType.setAttribute%28%22where%22%2C%20%22%5BitemType%5D.name%20like%20%27ZFCcontrainteTemplate%27%22%29%3B%0D%0A%0D%0A%0D%0Avar%20property%20%3D%20FCitemType.createRelationship%28%22property%22%2C%20%22get%22%29%3B%0D%0Aproperty.setAttribute%28%22select%22%2C%20%22label%22%29%3B%0D%0Aproperty.setAttribute%28%22where%22%2C%20%22%5Bproperty%5D.label%20like%20%27z%25%27%22%29%3B%0D%0A%0D%0Aconsole.log%28%22FCitemType%20before%20apply%3A%20%22%2BFCitemType.ToString%28%29%29%3B%0D%0AFCitemType%20%3D%20FCitemType.apply%28%29%3B] thanks lucasSolved5.9KViews0likes7CommentsHow to set default value to list onformpopulate
Hi, I've list field on some of the document classifications which is mandatory field, I have to set default value, it is getting set on that field but while saving the document, getting error "Please provide value for mandatory property". Below is code I written on "onformpopulate" event: var documentItem = document.thisItem; var type = documentItem.getProperty("classification"); if(type === "ABC" || type === "PQR") { document.getElementById("MainDataForm").sh_number.value = "100"; } How to handle this? Regards, Maddy.5.8KViews0likes2CommentsIs it possible to have a 3 stage filtered list?
By default, the filtered list has 1 filter layer hence 2 dropdown options to select from when creating a new Item. However, I would like to have 2 filters: Division > Process > Security measures. What would be the best approach to set this up?Solved4.9KViews0likes3CommentsAML to Update List Property
Good day. I added a list property to a few ItemTypes with a default value (itemtype, default value is the ItemType ID). When I create an entry the field is populated and identified correctly. When I try to update other entries using AML (Nash or Batchloader) the field has the correct information, but it is not recognized when I search the field. Example: DEMO-14 - this is the newly created entry DEMO_PDF - crated previously to the itemtype property being added I used Nash (and Batchloader to make sure) to update the property to the ItemType's ID. When I perform a 'get' action the fields display the exact same information. When I perform an Advanced Search, select the field, and select the appropriate Label from the list, only DEMO-14 is returned. I'm not sure what I am missing with this. Thank you for the help.3.5KViews0likes4CommentsERROR: dynamic list! Cannot read property 'setState' of undefined!
Hello all, I'm very new to ARAS, so please help) The goal is to create a dynamic list, which will be filled by the onLoad form event with articles. The code is from the Programmers Guide 12.0 "7.32 How to Create a Dynamic List" (after small modifications): ###################################################################### var inn = aras.IomInnovator; var dropdown = inn.getItemById("LIST", "29D876DB477243D6AB00C96466CE240C"); var list = inn.newItem("List", "get"); list.setAttribute("select", "id, keyed_name"); list = list.apply(); listOfTeams = [{ label: '', value: '' }]; listOfTeams.push({ label: "testtt", value: "esttt" }); dropdown.component.setState({list: listOfTeams}); return null; ###################################################################### Error: Technical MessageEvent handler failed with message: TypeError: Cannot read property 'setState' of undefined [function onload$user$handler(e) { try { if (onload1(e) === false) return false; } catch (exp) { aras.AlertError(aras.getResource('', 'ui_methods_ex.event_handler_failed'), aras.getResource('', 'ui_methods_ex.event_handler_failure_msg', exp.description ? exp.description : (exp + ' [' +arguments.callee.toString()+ ']')), aras.getResource('','common.client_side_err')); return false; } }] Stack TraceClient Side Error So please help! Kind regards and thanks in advance, Leonid3.5KViews0likes1CommentHow to set the value of dropdown form field to null, when the field is disabled
Hi, I have multiple dropdown fields in a form. For example i have 3 dropdown fields called 'list1', 'listA' and 'listB'. Thanks to @Christopher gillis for his blog, i can able to disable 'listB' dropdown field when the value of 'list1' is 'listA' . similary, disables 'listA' dropdown field when the value of 'list1' is 'listB'. my Problem is when i add an item, if i choose 'listA' from dropdown field 'list1', it enables 'listA' and i will choose a value call as 'Pannelleria' from dropdown list 'listA'. After sometime when i want to edit the item, i want to change the value of 'list1' from 'listA' to 'listB', i could able to disable the 'listA' and set the value to null on the form page and enables the 'listB' dropdown list. At this point, the value of dropdown field 'listA' is not set to null in database, instead it showing the value as 'Pannelleria'. i'm missing some code which give access to update the value in database. I attached following method in form events under OnFormPopoulate. Any suggestions or help is appreciable.! As i'm not a hard core programmer, improvising my code is also appreciable which helps me in learning. I'm working on Aras V12.0 Thanks. regards, Venkat. var input = document.getElementsByName("list1")[0]; var input1 = document.getElementsByName("listA")[0]; var input2 = document.getElementsByName("listB")[0]; setTimeout(function(){ if(input.getElementsByTagName("input")[0].value == "listA"){ input2.getElementsByTagName("input")[0].value = ""; input2.getElementsByTagName("input")[0].disabled = true; input2.getElementsByTagName("button")[0].disabled = true; input1.getElementsByTagName("input")[0].disabled = false; input1.getElementsByTagName("button")[0].disabled = false; } else if (input.getElementsByTagName("input")[0].value == "listB"){ input1.getElementsByTagName("input")[0].value = ""; input1.getElementsByTagName("input")[0].disabled = true; input1.getElementsByTagName("button")[0].disabled = true; input2.getElementsByTagName("input")[0].disabled = false; input2.getElementsByTagName("button")[0].disabled = false; } },100);2.5KViews0likes0CommentsTypeError: Cannot read property 'filed' of underfined
Hi, When I update data, use type List then error: "display_value_D_oneditstart handler failed with message: TypeError: Cannot read property 'field' of undefined" https://imgur.com/v5CaATD https://imgur.com/JX44iIF Please help me, thank you1.6KViews0likes0CommentsCreating dynamic list failed! ERROR: "property 'setState' of undefined"
Hello dear all, I'm very new to ARAS! I'm using ARAS V11SP14 and ... trying to create a dynamic list, which will be filled with articles. The code is from the Programmers Guide 12.0 "7.32 How to Create a Dynamic List" (after small modifications): ##################################################################### var inn = aras.IomInnovator; var dropdown = inn.getItemById("LIST", "29D876DB477243D6AB00C96466CE240C"); var list = inn.newItem("List", "get"); list.setAttribute("select", "id, keyed_name"); list = list.apply(); listOfTeams = [{ label: '', value: '' }]; listOfTeams.push({ label: "testtt", value: "esttt" }); dropdown.component.setState({list: listOfTeams}); return null; ############################################################################# The Error: Technical MessageEvent handler failed with message: TypeError: Cannot read property 'setState' of undefined [function onload$user$handler(e) { try { if (onload1(e) === false) return false; } catch (exp) { aras.AlertError(aras.getResource('', 'ui_methods_ex.event_handler_failed'), aras.getResource('', 'ui_methods_ex.event_handler_failure_msg', exp.description ? exp.description : (exp + ' [' +arguments.callee.toString()+ ']')), aras.getResource('','common.client_side_err')); return false; } }] Stack TraceClient Side Error ########################################################## I have no ideas how to fix it and cant find a solution in the forum as well! Thanks in advance!1.5KViews0likes0CommentsDrop Down field with better auto completion
Hi, I'm using ARAS R19. The drop down fields (linked to a list) are very poor and difficult to use on big list. Indeed, on the following list: The user is not able to start to enter "ELEC" to quickly find the expected line. The completion works well but only on the start of the string, not on the middle of the string. Do you know how to enable autocomplete on the middle for all DropDown fields ? Is there a way to "replace" the default dropdown list by a more advanced one (like this one https://harvesthq.github.io/chosen/) ?623Views0likes2CommentsChanging data type of property from filter list to multi value list, Changes needed to make for same functionality
Hi community, I have a property with datatype filter list, but I want to change it to multi value list, maintaining the same functionality of conditional options. What changes do I need to make. What would be the approach for it.0Views0likes1Comment