Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Built in Functions Used to Control Translate Values Dynamically

Built in Functions Used to Control Translate Values Dynamically

Ratings: (0)|Views: 1 |Likes:
Published by shery2710

More info:

Published by: shery2710 on Jan 02, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/13/2014

pdf

text

original

 
Built in functions used to control translate values dynamically.
Built in functions used to control translate values dynamically.We can control the Translate values in peoplecode using the functionAddDropDownItem.
 
Syntax :AddDropDownItem(CodeString, DescriptionString)
 
DescriptionThe AddDropDownItem method adds an item to the dropdown list in the control for thefield. The first time this method is called, it overrides the prompt table or translate tableused to populate the list. Those items no longer appear in the list. Only the items addedusing this method display.Subsequent calls to this method adds additional items to the dropdown list. The itemsadded with the first call to the method also display.If there is an existing value and the dropdown list is changed with these functions, theselection shows as (Invalid value) unless the new list contains an entry with the samecode as the existing value.Considerations Using AddDropDownItemIf the data for the dropdown is language sensitive, the values for the dropdown shouldcome from the message catalog or from a database field that has a related languagerecord, and should not be hard-coded.A good place for your Peoplecode program to populate a dropdown list is in the RowInitevent. This event executes before the page is shown for the first time, so it preventsunnecessary SQL.
 
ParametersCodeStringSpecify the value used to set the field value if this item is selected.Codes longer than the size of the field are truncated.DescriptionStringSpecify the value the end-user sees in the dropdown list.ReturnsNone.
 
ExampleUsing a hard coded list is not appropriate for this function because translations do notwork.The data must come from the Translate Table (or other record) directly so that the datais translated correctly.
Local Rowset &Xlat;&FLD = GetRecord(Record.JOB).GetField(Field.ACTION);&FLD.ClearDropDownList();Evaluate %ComponentWhen Component.JOB_DATA_CONCUR&Xlat = CreateRowset(Record.PSXLATITEM);&Xlat.Fill("WHERE FILL.FIELDNAME = 'ACTION' AND Fill.FIELDVALUEin ('ADL','HIR') and EFFDT = (select max(EFFDT) from PSXLATITEMB where B.FIELDNAME = 'ACTION' and B.FIELDVALUE in ('ADL','HIR')and EFFDT <= JOB.EFFDT)");

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->