Hi All,
I have a query rule as below and when passing to the process model, output is coming weird as Data: object,object. Please help!!
Expression rule output -
[startIndex=1, batchSize=1, sort=[field=updatedDateTime, ascending=false], totalCount=-1, data=[caseId:123,IDNumber:122567,caseStatus:On-Hold/Request for Info,clientName:user155678,folderId:1267888], identifiers=322]
When same rule passed and saved to pv of type datasubset in process Model:
[startIndex=1, batchSize=1, sort=[field=updatedDateTime, ascending=False], totalCount=-1, data=[object Object], identifiers=322]
Discussion posts and replies are publicly visible
Have you tried indexing the object to see if you can work with the data?
Thank you for the response David Jimenez yeah but I want to get the whole datasubset value and indexing would kill that right? For example, in my script task output I'm just calling rule!getuserdata(user: pv!userdetails) and saving this to a pv of type datasubset.
Not necessary, maybe is just the way that appian shows the information inside your process. That's why I asked if you are able to access the data.
David Jimenez when you say indexing the object, could you please show with an example what it means or how I can index in my query below:a!queryEntity_22r2( entity: cons!ABC_ENTITY_USERS, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1, sort: a!sortInfo(field: "updatedDateTime") ), selection: a!querySelection( columns: { a!queryColumn(field: "caseId"),a!queryColumn(field: "caseStatus"),a!queryColumn(field: "folderId") } ), logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "caseId", operator: "=", value: ri!clientCases.caseId, applyWhen: not( rule!APN_isBlank(ri!clientCases.caseId) ) ), a!queryFilter( field: "caseStatus", operator: "not in", value: {"STARTED"}, ), a!queryFilter( field: "docsSent", operator: "is null" ) } ) ))
Hi manam ,You can simply index by storing the above query in a local variable or directly using index() function.
a!localVariables( local!data:a!queryEntity_22r2( entity: cons!ABC_ENTITY_USERS, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1, sort: a!sortInfo(field: "updatedDateTime") ), selection: a!querySelection( columns: { a!queryColumn(field: "caseId"), a!queryColumn(field: "caseStatus"), a!queryColumn(field: "folderId") } ), logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "caseId", operator: "=", value: ri!clientCases.caseId, applyWhen: not( rule!APN_isBlank(ri!clientCases.caseId) ) ), a!queryFilter( field: "caseStatus", operator: "not in", value: {"STARTED"}, ), a!queryFilter( field: "docsSent", operator: "is null" ) } ) ) ), index(local!data,"data",{}) )
a!localVariables( /*You store the dataset in this variable*/ local!query: a!queryEntity_22r2( entity: cons!ABC_ENTITY_USERS, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1, sort: a!sortInfo(field: "updatedDateTime") ), selection: a!querySelection( columns: { a!queryColumn(field: "caseId"), a!queryColumn(field: "caseStatus"), a!queryColumn(field: "folderId") } ), logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "caseId", operator: "=", value: ri!clientCases.caseId, applyWhen: not( rule!APN_isBlank(ri!clientCases.caseId) ) ), a!queryFilter( field: "caseStatus", operator: "not in", value: {"STARTED"}, ), a!queryFilter( field: "docsSent", operator: "is null" ) } ) ) ), /*Index the variable and store the result in a new variable or just return the dataset*/ /*local!dataset: index(local!query, "data", null)*/ index(local!query, "data", null) )