Hi,
My Requirement is to update selected checkbox(Multiple selection checkbox) row data and status by selecting dropdown to the table.
Firstly I am querying data from the table and By multiple selection trying to update the data to the table via Status.
Steps:
1.I have multiple checkbox selection .
2. Once Checkbox selected ,which ever is selected as checkbox using Dropdown trying to update to the same table.
But Attached code is not working ,if Someone Suggests for solution that would be more helpful.
a!localVariables( local!crAppDynamicChecklist_cdt: rule!CR_APP_QE_getDynamicChecklistByFilters( cif_int: ri!cif_int, sectionType_txt: cons!CR_APP_DYNAMIC_CHECKLIST_SECTION_TYPES[1] ), { a!gridField( data: local!crAppDynamicChecklist_cdt, columns: { a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[1], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[1], value: joinarray( remove( split( touniformstring(index(fv!row, "uniqueId_txt", {})), "." ), 1 ), "." ) ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[2], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[2], value: "Collateral Documents" ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[3], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[3], value: fv!row.executedBy_txt ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[4], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[4], value: fv!row.docUniqueId_txt ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[5], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[5], value: fv!row.description_txt ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[6], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[6], value: fv!row.expiryDate_dt ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[7], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[7], value: fv!row.deferralDate ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[8], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[8], value: fv!row.complaintFlag_txt ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[9], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[9], value: fv!row.status_txt ), a!gridColumn( label: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[10], sortField: cons!CR_APP_TXT_ACTIVE_COMPLETED_DOCUMENTS_LABELS[10], value: fv!row.alertSince_dt ) }, pageSize: 10, selectable: true, selectionValue: ri!selected_int, selectionSaveInto: { ri!selected_int, a!save( ri!crAppDynamicChecklist_cdt.id_int, a!forEach( items: ri!selected_int, expression: index( index( local!crAppDynamicChecklist_cdt, fv!item, {} ), "id_int", {} ) ) ) } ), a!columnsLayout( columns: { a!columnLayout( contents: { a!dropdownField( label: "Update Document Status", placeholder: "Please select values", choiceLabels: { "CCAD Preparation", "CCAD Verified", "Business Review", "Business Execution", " CSG Review", "Customer Queue" }, choiceValues: { "CCAD Preparation", "CCAD Verified", "Business Review", "Business Execution", " CSG Review", "Customer Queue" }, value: ri!crAppDynamicChecklist_cdt.status_txt, saveInto: ri!crAppDynamicChecklist_cdt.status_txt ) } ) }, marginAbove: "STANDARD" ), a!buttonLayout( secondaryButtons: { a!buttonWidget( label: cons!APN_TXT_CANCEL, value: cons!APN_TXT_CANCEL, style: cons!APN_TXT_CANCEL_BUTTON_STYLE, confirmButtonLabel: cons!APN_TXT_CONFIRM, cancelButtonLabel: cons!APN_TXT_CANCEL, confirmMessage: " Do you really want to close ?", submit: true(), validate: false(), saveInto: ri!buttonAction_txt ) }, primaryButtons: { a!buttonWidget( label: cons!APN_TXT_SUBMIT, value: cons!APN_TXT_SUBMIT, style: cons!APN_TXT_CANCEL_BUTTON_STYLE, confirmButtonLabel: cons!APN_TXT_CONFIRM, cancelButtonLabel: cons!APN_TXT_SUBMIT, confirmMessage: " Do you really want to submit ?", submit: true(), validate: false(), saveInto: { ri!buttonAction_txt, a!save( ri!crAppDynamicChecklist_cdt, a!forEach( items: ri!crAppDynamicChecklist_cdt, expression: rule!NBF_COMMON_updateDictionary( dictionary: fv!item, fieldsAndValues: { status_txt: fv!item.status_txt, updatedOn_dt: now(), updatedBy_txt: loggedInUser() } ) ) ) } ) } ) } )
Thanks.
Discussion posts and replies are publicly visible
You can construct it in the button's save into instead of selection saveinto
Sorry Didn't get , could you please elaborate/Code Snippet?
Instead of using foreach in the selection saveInto, try to construct crAppDynamicChecklist_cdt using the list of selectedIds, in the Submit button's save into.
yes, I tried One Approach it worked.
I have Implemented One Link field using dynamic link.
a!localVariables( local!priority: false(), { a!linkField( /*label: "Link Field",*/ links: { a!dynamicLink( label: "Audit History", value: local!priority, saveInto: a!save(local!priority, true()) ) } ), a!sectionLayout( contents: { rule!CR_APP_SC_auditDetails( cif_int: ri!cif_int, sectionName_txt: cons!CR_APP_TXT_AUDIT_SECTION_NAMES[1] ) }, showWhen: local!priority ) } )
On Click of that link I am displaying one grid.
But that should be in sideByside Layout, Since that grid has boxLayout and GridField its throwing me an error,How Would I make use of that code in side By Side Layout.
You cannot have layouts inside side by side item. Try using columns layout for that.