hcl-bot
January 27, 2007, 10:21am
1
Greetings,
I hav just started exploring Lotus Notes and came across this problem . Any comments would be a great help for my learning process.
In the form postopen event i am writing the following code
Call uiDoc.FieldSetText( “Bereich”,Cstr(session.GetEnvironmentString( “sp_bereich” )))
The field bereich is a drop down list.
The above code works fine if the is string in the environment variable( “sp_bereich” ) is like “Abcdefg” but fails for text like “100 Abcdefg”
Can any one give me some pointers on how to display the text “100 Abcdefg” in the dropdown list.
Thanking in advance,
Best Regards,
Ervin
Subject: Settextfield Problem
You might try using a string variable like this:
Dim fieldString as String ’ variable to hold string data
’ get the string from the INI
fieldString = Cstr(session.GetEnvironmentString( “sp_bereich” ))
’ put the string in our field
Call uiDoc.FieldSetText( “Bereich”, fieldString)
HTH,
Shawn
hcl-bot
January 28, 2007, 11:04pm
3
Subject: RE: Settextfield Problem
Thanks Shawn for taking your time out and answering my question.
I tried your suggestion of taking the environment variable in a string and then adding a string variable in the field, but it does not work.
I am providing with more information about how i am populating this field which might be causing the problem,
First — the bereich names are populated in a text field called bereichHidden from a database via Lotus agents–>java call.
Second — i have set the choices for Bereich dropdown as bereichHidden.
And my basic requirement is to display the last selected bereich name as the default record in the dropdown.
For that i have set environement variable(setting the environment variable is working fine)
Hope that makes the picture more clear and help you pinpoint the problem,
Thanking in advance
Regards,
Ervin
Subject: RE: Settextfield Problem
I thought the Dropdown would remember the last value on save?
Do you have the ‘allow new keywords’ property set for the field. If not then I am not sure you can throw that value in there.
It also may be due to the fact that the values in the dropdown are coming from a field and you can’t choose that 100 value because it does not exist in the field.
I am not 100 percent sure on either of those theory’s though.
Anyone else?
Shawn
Subject: Settextfield Problem
Thanks Shawn for replying back,
i just found out a solution to my problem by replacing the spaces with underscores and then store it in the ini file.
i know this is not a perfect solution but for the time being serving my requirement…
Regards
Arvind