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. <AML> <Item action="get" type="itemType" select="name" where="ItemType.name = 'ZFCcontrainteTemplate'"> <name>part</name> <Relationships> <Item type="property" action="get" select="value, label" where="[property].label like 'z%'" /> </Relationships> </Item> </AML> var FCitemType = inn.newItem("itemType", "get"); // FCitemType.setProperty("name","FCcontrainteTemplate"); // FCitemType.setAttribute("select", "name"); FCitemType.setAttribute("where", "[itemType].name like 'ZFCcontrainteTemplate'"); var property = FCitemType.createRelationship("property", "get"); property.setAttribute("select", "label"); property.setAttribute("where", "[property].label like 'z%'"); console.log("FCitemType before apply: "+FCitemType.ToString()); FCitemType = FCitemType.apply(); thanks lucasSolved6KViews0likes7CommentsHow 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?Solved5KViews0likes3CommentsAML 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.6KViews0likes4CommentsERROR: 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/) ?666Views0likes2CommentsWhat is the fastest way to get List LABELS (!!) in C# and JS?
Hi community, does anyone know a fast way to get the labels of list items in C# and JS? I am writing a small Jira connection were I transfer the content of a regular Innovator item. The item has a dropdown list. We can get the selected dropdown value quite easily with something like this.getProperty("mylist",""); But in my Jira item I don´t want to display the list value, but the list label. In best case I even want to specify the target language of the label that should be used. Currently I know two options, but both require too much code for my taste: 1. Make a "get" query against the "Value" table. 2, Get the full list item with all values and labels and than match the current property value with the full list. First option works fine when we only need to get the label of a single dropdown value. But it would produce a large amount of queries if we have multiple items in a loop. The second options works better for multiple items, as we only have to get the complete List one time. But I wonder if there is an inbuilt function to make this all easier to do by default? Does anyone know more? Thanks! Angela69Views0likes2Comments