Hi all,
Absolute newbie in appian here. I have been tasked with developing a form that allows me to choose cases and tasks and transfer ownership of them to another user.
I have created a simple process model, with just a start and end node, and set up the process start form for the process model, to an interface that I hope will display the available tasks and cases, and allow me to select them, and then to choose a user to whom I want to transfer ownership.
I don't know if my approach is wrong, and consequently if there's a better way to do this, or if this approach is as good as any.
Part 1 of the task is to get a form up that allows me to identify the tasks and cases I want to transfer and to identify the user to whom I want to transfer them. There's an existing process model that I can probably call once I have identified tasks, cases and the user to whom ownership should be transferred - so first is to get the data into the interface so I can choose from the list.
I have created two local variables in my interface by putting code at the start of my interface that look like this:
load( local!dbTasks: a!queryEntity( entity: cons!iMY_TASKS_DS, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 10 ) ) ), local!dbCases: a!queryEntity( entity: cons!iMY_CASE_DETAILS_DS, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 10 ) ) ),
I then have a sectionLayout that looks like this:
a!sectionLayout( label: "Section", contents: { a!pickerFieldUsers( label: "User Picker", labelPosition: "ABOVE", saveInto: {}, validations: {} ), a!gridField ( label: "Tasks to select from", totalCount: if( rule!APN_isEmpty( index(local!dbTasks,"data","") ), 0, index( local!dbTasks, "data.totalCount", 0 ) ), columns: { a!gridTextColumn( label: "Task ID", field: "taskId", data: index( local!dbTasks, "taskId", {} ) ), a!gridTextColumn( label: "Task Description", field: "taskDescription", data: index( local!dbTasks, "taskDescription", {} ) ) }, value: local!taskGridSelection, saveinto: local!dbTasks ), a!gridField ( label: "Cases to select from", totalCount: if( rule!APN_isEmpty( index(local!dbCases,"data","") ), 0, index( local!dbCases, "data.totalCount", 0 ) ), columns: { a!gridTextColumn( label: "Case Number", field: "caseNumber", data: index( local!dbTasks, "caseNumber", {} ) ), a!gridTextColumn( label: "Case Description", field: "caseDescription", data: index( local!dbCases, "caseDescription", {} ) ) }, value: local!caseGridSelection, saveinto: local!dbCases ) } )
However, when I run this form, no data is loaded into the two grids. What do I need to do to get the data into the grids?
thanks heaps,
David.
Discussion posts and replies are publicly visible
load( local!taskGridSelection: a!gridSelection( selected: {}, pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 10 ) ), local!caseGridSelection: a!gridSelection( selected: {}, pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 10 ) ), with( local!dbTasks: a!queryEntity( entity: cons!iMY_TASKS_DS, query: a!query( pagingInfo: local!taskGridSelection.pagingInfo ), fetchTotalCount: true ), local!dbCases: a!queryEntity( entity: cons!iMY_CASE_DETAILS_DS, query: a!query( pagingInfo: local!caseGridSelection.pagingInfo ) ), a!sectionLayout( label: "Section", contents: { a!gridField( label: "", totalCount: local!dbTasks.totalCount, columns: { a!gridTextColumn( label: "Task ID", field: "taskId", data: index( local!dbTasks.data, "taskId", {} ) ), a!gridTextColumn( label: "Task Description", field: "taskDescription", data: index( local!dbTasks.data, "taskDescription", {} ) ) }, identifiers: local!dbTasks.identifiers, value: local!taskGridSelection, saveInto: { local!taskGridSelection }, rowHeader: 1, selection: true, shadeAlternateRows: false ), a!gridField( label: "", totalCount: local!dbCases.totalCount, columns: { a!gridTextColumn( label: "Case Number", field: "caseNumber", data: index( local!dbCases.data, "caseNumber", {} ) ), a!gridTextColumn( label: "Case Description", field: "caseDescription", data: index( local!dbCases.data, "caseDescription", {} ) ) }, identifiers: local!dbCases.identifiers, value: local!caseGridSelection, saveInto: { local!caseGridSelection }, rowHeader: 1, selection: true ) } ) ) )