Hello I'm trying to get the task id from my read only grid with selection function of grids. I'm trying to store the task id in rule input, but what this is doing now is when I select one row it's storing all task id's in the rule input not only the single which I have selected and it's not updating the selection in the UI it's refreshing and the selection is gone. And when I load the interface by default it's showing 1 selected.I want to be able to select one row pick the task id store it in rule input and show in the UI that the row is selected, then the same if I select another one save the task id and update UI if something is unselected remove that value from the rule input and update the UI.
pageSize: 20, selectable: true, selectionValue: local!report.data[1]["c19"], selectionSaveInto: a!save( saveInto: ri!test, value: local!report.data["c19"] ), showSelectionCount: "ON", rowHeader: 1
Discussion posts and replies are publicly visible
Hi Shwapx you need to follow the below code for having selection in reading only grid. You can make the changes for the below code as per your requirement
selectionSaveInto: {
local!selection,
a!save(
local!selectedEmployees,
append(
fv!selectedRows
)
),
/*This save removes the full rows of data for items deselected in the most recent user interaction to local!selectedEmployees. */
difference(
fv!deselectedRows
}
My grid is coming from process report, I need to see if i can adjust as per mention
Okay but that save the whole row of data from the process report. how to save for each row task id which is located here - local!report.data["c19"]
pageSize: 20, selectable: true, selectionValue: local!selection, selectionSaveInto: { local!selection, /*This save adds the full rows of data for items selected in the most recent user interaction to local!selectedEmployees. */ a!save( ri!test, append( ri!test, fv!selectedRows ) ), /*This save removes the full rows of data for items deselected in the most recent user interaction to local!selectedEmployees. */ a!save( ri!test, difference( ri!test, fv!deselectedRows ) ) },
Just index the column fv!selectedRows.columnName.
That's the problem I don't have a column the column is hidden and I got the value from local variable report which is storing the taskID in c19 field.
just use fv!selectedrows.c19, aren't you indexed this way to show it on grid itself?? fv!row.c19
No I'm pulling it directly from the report. This save the value, but get error:And yes my rule input is integer since this is the value:
pageSize: 20, selectable: true, selectionValue: local!selection, selectionSaveInto: { local!selection, /*This save adds the full rows of data for items selected in the most recent user interaction to local!selectedEmployees. */ a!save( ri!test, append( ri!test, fv!selectedRows.c19 ) ), /*This save removes the full rows of data for items deselected in the most recent user interaction to local!selectedEmployees. */ a!save( ri!test, difference( ri!test, fv!deselectedRows.c19 ) ) }, showSelectionCount: "ON", rowHeader: 1
Hello Shwapx
Use toInteger(fv!selectedRows.c19) and tointeger(fv!deselectedRows.c19).
Just cast it with tointeger()
That works, perfect. And now the intention is to pass that array let's say user selected 4 rows of task which they want to reassign in reassign smart service. I hope I can pass the array in the smart service and user be able to reassign with in bulk way.
AFAIK, you can't use the 'Reassign Task' smart service to assign multiple tasks. However, you can do Multiple Node Instance (MNI).
This is what I did and it's working perfect