/* Data Inputs are: button (text) and onHoldAccounts (any type) */ load( local!pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 10, sort: a!sortInfo(field:"aipCode", ascending: true())), with( local!onHoldAccounts: a!queryEntity( entity: cons!ESC_ACCOUNT_DETAILED_V_DS, query:a!query( selection: a!querySelection( columns:{ a!queryColumn(field:"aipCode"), a!queryColumn(field:"aipName"), a!queryColumn(field:"accountNum"), a!queryColumn(field:"fiId") } ), logicalExpression: a!queryLogicalExpression( operator: "AND", filters:{ a!queryFilter(field: "fiId", operator:"IN", value:ri!onHoldAccounts.fiId), a!queryFilter(field: "accountNum", operator: "IN", value: ri!onHoldAccounts.accountNum) } ), pagingInfo:local!pagingInfo ) ), a!formLayout( label: "View On Hold Accounts for " &today(), firstColumnContents: { a!sectionLayout( firstColumnContents: { a!gridField( columns:{ a!gridTextColumn(label: "AIP Code", field: "aipCode", alignment: "CENTER", data: index(local!onHoldAccounts.data, "aipCode", {})), a!gridTextColumn(label: "AIP Name", field: "aipName", data: index(local!onHoldAccounts.data, "aipName", {})), a!gridTextColumn(label: "Routing Number", field: "fiId", data: index(local!onHoldAccounts.data, "fiId", {})), a!gridTextColumn(label: "Account Number", field: "accountNum", data: index(local!onHoldAccounts.data, "accountNum", {})), }, totalCount: local!onHoldAccounts.totalCount, value: local!pagingInfo, saveInto: local!pagingInfo ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidgetSubmit( label: "Update Accounts", style: "PRIMARY", value: "update", saveInto: ri!button ) }, secondaryButtons: { a!buttonWidgetSubmit( label: cons!ESC_DISPLAY_BUTTON_LABEL_CLOSE, skipValidation: true, value: cons!ESC_DISPLAY_BUTTON_LABEL_CLOSE, confirmMessage: "Are you sure you want to close? You cannot re-generate payments until accounts have been updated. If you close, you can pick this task back up in your task list.", saveInto: ri!button ) } ) ) ) )