Expand my Community achievements bar.

Drop-Down List Box on Form Is Cleared at Each Step in a Workflow Process

Avatar

Former Community Member
Hello users,



I am posting this in the Workflow Designer, Workflow Server and Form Designer forums so that it gets a little more exposure, so I apologize if you receive this more than once.



I have a Form Designer 5.0 form attached to a Workflow Server 6.1 process. On the form, I have a drop-down list box being populated from a text box by the OnDataLoad event on the form ONLY when the process is first initiated. The text box is populated by the OnAssign event of the first step in the process map. When the task initiator submits the form to the second step in the process and the user opens the form, the drop-down list box is no longer populated - it has been cleared. There is no code anywhere in either the form or in the process map that clears this field.



Can anyone tell me why this is happening? Is it a bug?



Thanks.
2 Replies

Avatar

Former Community Member
Hi Perry,



Yes it is a bug and a pain in the butt at that!



The only way that I have been able to get around this is to add this code to a script object called VBGlobal for lists and combos.



I call the VBGlobal.PutData() just before a submit and a VBGlobal.GetData() on entering a page hope this helps



If Not VBGlobal.bFormLoaded Then

VBGlobal.GetData()

VBGlobal.bFormLoaded = True

End If



'start of vbglobal



Dim bFormLoaded



Sub GetData()

'This takes the values of all the combo boxes when submitted and puts them back as there is a bug in adobe forms

If DataHolder.Text <> "" Then

Execute(DataHolder.Text)

End If

End Sub



Sub PutData()



Dim Control

Dim iThisForm

Dim strControlList

Dim sQuote



sQuote = Chr(34)



For iThisForm = 0 To 5

For Each Control in Form.Controls(iThisForm).Controls

If Left(Control.Name, 3) = "cbo" or Left(Control.Name, 3) = "lst" Then

If Control.Name <> "cboSearchType" then

strControlList = strControlList & Control.Name & ".ChoiceList = " & sQuote & Control.ChoiceList & sQuote & ":" & _

Control.Name & ".CurrentSelection = " & Control.CurrentSelection & ":"

End if

End If

Next

Next



strControlList = Replace(strControlList, vbNewLine, sQuote & " & vbNewLine & " & sQuote)

strControlList = Replace(strControlList, vbLF, sQuote & " & vbLF & " & sQuote)



DataHolder.Text = strControlList



End Sub

Avatar

Former Community Member
Yes we have to repopulate the listbox also from a hidden textbox...