PDA

View Full Version : Can not get a simple dropdown list to work in dialog


ABC123

jaryder
10-20-2011, 11:15 AM
I am following the instructions in the new dialog to define a variable in the ondialoginitialize function and then reference it in the dropdown and the dropdown does not see it. Below is the functions code and screen shot of the setup of the dropdown and the result in working preview. Is this a problem or is there something I am just missing.


function onDialogInitialize as v (e as p)
'Inside e:
'e.tmpl = Component definition
'e.rv = Request variables
'e.session = Session variables
'e.rtc = Runtime calculations - you can use this to store data to be passed to other server side events
'e.arguments = SQL::Arguments object with values for each of the arguments defined in this component. To read a value from arguments: e.arguments.find("argumentName").data

'You can set the initial value of any field by setting the property
'e.control.<fieldname>
'For example:
'e.control.firstname = "Fred"
'e.control.lastname = "Jones"

'To set the value of a field in a repeating section, you must use "_A5INSTANCE" and the instance number as a suffix on the fieldname.
'For example:
'e.control.firstname_A5INSTANCE2 = "Bob" 'sets the value in the 2nd row of the repeating section.

'To specify any javascript that you want to execute set the e.javascript property. For example:
'e.javascript = "alert('hello');"

e.rtc.list2=comma_to_crlf("Alpha,Beta,Gamma")
end function


2967829679

Running 2199-3810 from this morning

jaryder
10-20-2011, 11:31 AM
I just changed the function to e.session.list2=comma_to_crlf("Alpha,Beta,Gamma") and changed the dropdown to use session.list2 and the list displays in working preview but not in live preview or when published.