This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 31, 2013, 2:12 PM
22 Posts

Run action on selected documents

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: Selected documents,viewpanel
  • Replies: 4
Someone an example on how to run an action on selected documents with values from a dialogbox ?

- Select documents in a view

- use an button "Modify" that will display a dialogbox which contains 4 input fields

- When pressing ok the selected documents in the view need to be updated with the values of the dialogbox


ex/ doc.Field1 = dlg.Field1

doc.Field2= dlf.Field2

 

Problem is when submit the dialogbox and a partial or full update, we lose the SelectedDocIds array and we can't update the documents in the SSJS of the "Modify" button
May 31, 2013, 7:48 PM
366 Posts
Re: Run action on selected documents
 store the selected documents array in a session scope variable and then process the array from the session scope variable once the values are selected in the dialog box
Jun 1, 2013, 5:18 PM
22 Posts
Re: Run action on selected documents
Yes, we do that.

 But when we're going back from CSJS to the SSJS of the button we lose the documentIds of the selected documents due the refresh on the submit event of the ok button in the dialogbox.
Jun 2, 2013, 4:21 PM
366 Posts
Re: Run action on selected documents
Not sure how you are losing a session scope variable in the transition.  Once a value has been set to a session scope variable then it is set until the browser session ends or the value is reset by user interaction or code. 

 The dialog box button does not have to be a submit button, it just needs to close the dialog box.

Change the button type from "submit" to "button" and change the event handler. 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal