AnsweredAssumed Answered

Saving forms with dynamic drop-down menus

Question asked by samuel.leibowitz on Jun 10, 2014
Latest reply on Mar 18, 2016 by Scott_Owens

Hi all,

I'm currently working on a new version of the SRF we use to initiate most of our orchestrated requests.  Because the orchestrated processes involved touch sensitive applications on customer systems, our use pattern for these is generally fairly involved:

  1. The developers (myself included) publish the model SRF, which is eventually distributed to our users.
  2. The user then makes a copy of the model SRF, edits it to include data pertaining specific to the customer and appropriate operation, then saves it.
  3. After review,  the process is eventually executed by starting the copy of the SRF.

Part of the useability enhancements I've been working on involve setting up a pair of drop down fields which specify what the operation is the user is trying to execute. There's an "Event Type" and a "Selected Operation" - clicking on the Event Type dynamically sets the contents of the Selected Operation:

updateSelectableOperations : function() {

var options = ca_fd.js.getSelectableOptions(); // returns an object with two arrays, of Keys and Values
var selectOperationOptions = ca_pam_createSelectStore(options.longNames, options.shortNames);

ca_pam_addValuesInSelectStore("Form.SelectOperation", selectOperationOptions)

var selectedOption = ca_pam_getSelectedOptionValues('Form.SelectOperation')
ca_fd.js.showHideFields() // unrelated

So far, this works great, with one wrinkle - if I save the form and re-load it, whatever I picked as the Selected Operation now appears as the shortName in the select box, not the longName.

So for example, if

options.longNames = ["one", "two", "three"]
options.shortNames = ["1", "2", "3"]


then when I select the first option it looks like "one", but if I save the form and reload it, it looks like "1". (Plus, the other options disappear and don't come back unless I select another event type and then click back again.)

Any ideas what might be causing this? Or advice on how to proceed?