...
Code Block | ||
---|---|---|
| ||
function getDupProdIds(tId, selectedInputValues, that) { let dupProdIds = [] let selectedItemId = selectedInputValues["CATLG_ITEM_ID"] for (let i = 0; i < allTasks.length; i++) { let currentTaskInput = that.getInputValueByID(allTasks[i].taskValues.taskId) let currentTaskItemId = currentTaskInput["CATLG_ITEM_ID"] if(currentTaskItemId == selectedItemId) dupProdIds.push(currentTaskInput["productID"]) } return dupProdIds } let that = this let tIdsInputValues = this.getInputValueByID(tID) let val = values["Select Action"]; if(val == "Duplicate"){ let dpValuIds = getDupProdIds(tID, tIdsInputValues, that) //dpValuIds() console.log("dup", dpValuIds) this.changeFormValue("dup_productID", dpValuIds.join(), tID) } else { this.changeFormValue("dup_productID", tIdsInputValues["productID"], tID) } |
14. Enable/Disable Buttons:
The following custom code can be plugged in to disable/enable a few actions buttons conditionally.
i. To hide user action buttons
...