-
Recently active
Is is possible to update multiple fields of a CDT using the a!update()? The documentation shows that you can for a regular array, but with the CDT examples shown, it only updates one field at a time. When I test it out in an expression, it throws an error. I just want to check that I'm not missing anything here. e.g. a!update( data: ri!submission, index: {"StatusID", "SubmissionTypeID"}, value: {1, 2} ) error thrown: Expression evaluation error at function a!update: Invalid index: cannot index multiple indices of type List of Text String into type CRA_T_Submission
My process model has an integration task that calls an API and then follows up to write into my database, but I keep getting this error when I run it: Cannot index property 'property' of type Text into empty List of Dictionary) (Data Outputs) From what I'm understanding is that the PM can't write a List ({}) to the DB and rightfully so. So in my expression for the output I have this: if( length( rule!myIntegration().result.body.people.person.address ) =0,"", rule!myIntegration().result.body.people.person.address.state.value) I try to tell the expression, that if the List ({}) is empty (or length of 0), then to make it an empty string ("") so it can write an empty string to the DB instead of a List (why the error happens), otherwise if not empty or not 0, to add the value to the DB. I would think this work but I keep getting this error. My JSON API string is as follow: { "people": [ { "id": 1, "person"
I have this expression rule and I need to get the value of one of the keys based upon whether another key property is true or false, I have this but doesn't work: a!localVariables( local!myDictionary: { { item: 1, active: true, description: "Widget", color: "Green"} ,{ item: 2, active:false, description: "another", color: "red"} }, if( fn!index(local!myDictionary,"active","") == true, fn!index(local!myDictionary,"color",null), "") ) To explain further: I would want to return the value "Green" from the key property color due to active property being true and not the value "red" because active property is false.
Hi, So Im trying to get this code to save below into my ri! field but no matter what I do it will not save. Can someone please tell me whats wrong here?
Hello, I have a requirement where I want to use the body present in the XML document as text. And use that text as the rule input value. Is there any way to achieve this? Thanks
if( rule!APN_IsBlank(ri!userOrGroup), "", if( runtimetypeof(topeople(ri!userOrGroup)) = 'type!{http://www.appian.com/ae/types/2009}User', user(touser(ri!userOrGroup), "firstName") & " " & user(touser(ri!userOrGroup), "lastName"), if( runtimetypeof(topeople(ri!userOrGroup)) = 'type!{http://www.appian.com/ae/types/2009}Group', group(togroup(ri!userOrGroup), "groupName"), "" ) ) ) Hello All, Please find the above code ( rule it is to get user or group name ) when you enter a user name it's showing it is user and when you Test with a group name it's giving me an error Please look at the code is there any mistake Thanks in advance
i am trying index the property "ISOCountryCodeOfIssue", if it is not available in the dictionary (data). We need to default value output. We run the expression , it return back null instead of "BCD" property( { /*ISOCountryCodeOfIssue: "ABC",*/ expiryDate: "10/20/2016", issueDate: "10/20/2011", documentId: "XR58", documentType: "PASSPORT", issuingAuthority: "EN" } ,"ISOCountryCodeOfIssue","BCD") Not sure what am i exactly missing here
How to create an expression rule that returns a list of data from a table in a database? I already queried in my data using a constant, now I need to create a rule that will returns a list of employee names from a database using the tables primary key (employee_id).
Hi all, I'm trying to clean up some very messy data by converting text strings representing dates into date objects. The input strings are extracted from various documents (using Appian Document Extraction), so the messiness of the inputs is not something I have control over and cannot be standardized ahead of time. I've found multiple posts on this forum featuring recent recommendations from Appian employee [mention:ab53b06651874f7ba5bfbf12e75aa807:e9ed411860ed4f2ba0265705b8793d05] to use the value() function for this purpose, so it does seem like this is an expected use case for the function; I'm not trying to do something crazy here. However, the value function does not appear to be working as documented...? This is copied directly from the latest version (21.2) of the official value() documentation on the value() function: Syntax value ( text, [format] ) text: (Text) The string of characters to be converted into a number or date. format: (Text) The
I have a view table which contains 100000 records. What measures are to be considered to obtain faster query results?
Hi Everyone, I have a requirement to update more than 100 constants from the UI, for that I created Process model and I used Update Constant smart service , But the problem I am facing is for each constant I have to use separate "UPDATE CONSTANT" smart service. So is there any way to handle this kind of situation, apart from writing Smart service for each constant?
Team, We have a requirement to transfer a document from one appian system to another. Do we have any template for sample code for WebApi , can the same be achieved using webapi?
We had an issue at production yesterday where the system tried to access a property inside an empty string.Looking more closely, we discovered that the a!fromJson is not doing as it was supposed to do. Here on the a!fromJson (21.1) documentation, we see that the property with an empty string it's converted to null But when we execute the same code on the expressions, this comes back as an empty string, not maintaining its described functionality. The problem is that when we try to access a property from a null value, it does not throw an error. But when we try to access a property from a Text it throws an error and we know how problematic those are
Hello, how to build an expression rule which has 2 inputs - 1 is string, 2nd is alphabet. print the count of characters matching alphabet with the string (Umbrella to expected Result -u1m1b1r1e1l2a1)
Hi there, kind new to Appian, just want to know how to remove the leading zero from a string in Expression rule. thanks,
I have the following situation: - search text field for entering the client's ID - ADD button that does the search and adds the client to the grid - pretty complex UI which has this part regarding ADD button: a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Add", saveInto: { a!save(local!addbButtonSwitch, not(local!addbButtonSwitch)), a!localVariables( local!client: a!refreshVariable( value: rule!APP_getclient( clientGroup: fv!item.id, clientCheckCdt: ri!clientCheck_cdt, clientRequestCdt: ri!request_cdt, searchString: trim( local!searchId[fv!index] ),
Hi, I have Question on adding a new field with Number(decimal) as type in CDT by using XSD Uploading, i am in confuse situation where what will the following values for Decimal?? is it decimal or float or double in XSD file </xsd:element> <xsd:element name="Amount" nillable="true" type="xsd:double"> <xsd:annotation> <xsd:appinfo source="appian.jpa">@Column(name="AMOUNT", length=255)</xsd:appinfo> If needed to Map the same field to Database SQL what will be AMOUNT column will be?? is it decimal or Double or Float or something else and also does length also be mentioned??
Hi, I have a dictionary as below - a!localVariables( local!data: { { col1: 1, col2: "N1", col3: "A1", col4: "S1" }, { col1: 2, col2: "N2", col3: "A2", col4: "S2" }, { col1: 3, col2: "N1", col3: "A1", col4: "S3" } }, local!data) I want a result that comes up post running this code - a!localVariables( local!data: { { col1: 1, col2: "N1", col3: "A1", col4: "S1" }, { col1: 2, col2: "N2", col3: "A2", col4: "S2" }, { col1: 3, col2: "N1", col3: "A1", col4: "S3" } }, local!commonData: a!forEach( items: local!data, expression: { data: index( local!data, wherecontains( merge({ fv!item.col2 }, { fv!item.col3 }), merge({ local!data.col2 }, { local!data.col3 }) ), {} ) } ), union(local!commonData,local!commonData)) But I am getting error Expression evaluation error at function 'union' Cannot compare ty
Same as subect
Hello community, I wonder if it is possible to check with in a if condition if a passed value of any type is a CDT.I want to make a generic expression rule to convert a body from JSON to CDT with two rule inputs.1 body of type text.2 any type, but only CDT's so no integer, string etc. So I want the to JSON function only to execute when the ruleinput is a CDT, if not I want to return a custom error message text string.Are the CDT in a specific reserved numeric range so I can use that, or is there another approach? Kind Regard, Erik
a!queryEntity( entity: cons!CH_ENTITY_Clients, query: a!query( filter: a!queryFilter( field: "cid", operator: "=", value: ri!rid, ), pagingInfo: a!pagingInfo( startIndex: "1", batchSize: "1" ) )).data
Hello, after Appian upgrade to version 20.4, I have a problem with confirming Save & Close button in Expression EditorClose and Save & Close buttons are now up and when I try to click on Save & Close button it's like I'm trying to edit that button.I can't confirm it. Any suggestions? How to solve that problem?Thanks, BR
Hi All, Could u pls help me for my below questions What are the steps to follow the Appian to External System?
I have one editable grid in which one priority field is there: a!integerField( label: "Priority", labelPosition: "ABOVE", value: if(not(isnull(fv!item.priority)),int(fv!item.priority)-rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain),fv!item.priority), /*saveInto: a!save(fv!item.priority,if(rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)>0,a!save(save!value,int(fv!item.priority)-rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)),save!value)), */ saveInto: {a!save(fv!item.priority,save!value) /*if(rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)>0,a!save(fv!item.priority,int(fv!item.priority)-rule!CRP_CheckPriority(fv!item.priority,fv!item.contentdomain)),a!save(fv!item.priority,save!value))*/ }, refreshAfter: "UNFOCUS", readOnly: if(local!gridreadonly="Edit",true,false), validations: {if(and(local!gridreadonly="Save",not (isnull(fv!item.priority))),{if(count(rule!CRP_Get
Hi everyone, I need to create two expression rules that shows: 1. The information of all unfinished instances of the processes (what is seen in monitoring as not completed) in a range of dates. 2. Same, but with finished instances. Both must return a dictionary list with the basic information of the process: name, who started it and start date. Can you help me? Thank you!!
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.