On my Desktop Application in V11 I have an Interaction Queue that allows a manager to Issue or Reject customer interactions created by a CSR.
Each row has two buttons "Issue" and "Reject".
On the Browse, Events, Events I've create the following script. This script allows the Issue button to work, but only for the first row and not for the row the user selected. For example: If the user clicks the "Issue" button on the 2nd row, the data is entered into the fields in the 1st row.
So I have two issues.
1: How do i correct the "Issue" button not performing the action requested for that specific row, and how to make it refresh the browse.
2: How do I add the script to allow the Reject button to also work?
Capture.JPG
Each row has two buttons "Issue" and "Reject".
- The "Issue" button should enter the user name into the Control_BROWSE1:Issd_by field, the current time into the Control_BROWSE1:Issd_tme field, todays date into the Control_BROWSE1:Issd_date field, then refresh the browse.
- The "Reject" button should clear the Control_BROWSE1:Csrsb_date and Control_BROWSE1:Csrsb_tme fields, then refresh the browse.
On the Browse, Events, Events I've create the following script. This script allows the Issue button to work, but only for the first row and not for the row the user selected. For example: If the user clicks the "Issue" button on the 2nd row, the data is entered into the fields in the 1st row.
Code:
'Date Created: 30-Apr-2012 03:50:24 PM 'Last Updated: 30-Apr-2012 04:08:30 PM 'Created By : mdolan 'Updated By : mdolan FUNCTION Unbound_ButtonClick AS V ( event AS C, data AS C , row AS N ) 'DESCRIPTION: Fired when a button is clicked on a column. 'Arguments: event - the name of the event that is fired ' data - the data in the column cell ' row - the row number in the browse 'this.SetViewport_Row() sets the current row to the row with the button that was clicked. this.Set_Viewport_row(row) DIM form_name as c if is_object(topparent.this) then form_name = topparent.name()+".this" else form_name = "" end if DELETE expression_result expression_result = eval("user_name()",form_name) parentform:Control_browse1:Issd_by.value = expression_result DELETE expression_result expression_result = eval("time()",form_name) parentform:Control_browse1:Issd_tme.value = expression_result DELETE expression_result expression_result = eval("date()",form_name) parentform:Control_browse1:Issd_date.value = expression_result END FUNCTION FUNCTION Reject_ButtonClick AS V ( event AS C, data AS C , row AS N ) 'DESCRIPTION: Fired when a button is clicked on a column. 'Arguments: event - the name of the event that is fired ' data - the data in the column cell ' row - the row number in the browse 'this.SetViewport_Row() sets the current row to the row with the button that was clicked. this.Set_Viewport_row(row) END FUNCTION
1: How do i correct the "Issue" button not performing the action requested for that specific row, and how to make it refresh the browse.
2: How do I add the script to allow the Reject button to also work?
Capture.JPG
Comment