Rob's TIMSS Blog

My discoveries and ramblings of TIMSS/Personify.

Monday, February 20, 2006

Extender Script: Default Language

TIMSS 6 supports multiple languages. One place you will see this is in product setup screens on the Product Description, Brief Description, & Long Description tabs where you can enter different descriptions for each language.

If your organization is like mine, we only use English. Thus choosing English every time we enter a description is a bit tedious. I have some pity for my end users, so using Extender Scripting I have set the default value to English.

The example below is from the Web Control- Long Description tab. I've added code to the event that fires after the Add Text button has been clicked.

Public Sub cmdAddLangDesc_AfterAction ( ByRef MyForm As Object, ByRef MyControl As Object)
MyForm.getFormControlByName("cboLanguage").Value="EN-US"
MyForm.getFormControlByName("cboLanguage").Text="English - US"
MyForm.getFormControlByName("rbPlainText").checked=True
End Sub


The Value is the code that is stored in the database, and the Text is the value (code's description) that's displayed on the screen. You will also notice that I've set the Plain Text radio button to checked.

And so when the user clicks the Add Text button, the Language is initially set to "English-US" and the Plain Text radio button is checked. These are just the initial values when the button is clicked and can still be changed to other values.




I'm sure in a future release you will be able to set a default language for the application, however this is a good example of how to set default values on screens.

Applies to: TIMSS6

0 Comments:

Post a Comment

<< Home