Setting the value of a field based on a dropdown list
I am using the latest production release of JHeadstart 10.1.3.0.91. I am trying to set the value of a field based on selecting the value of another field (drop down list). The drop down list field has the following attributes set autoSubmit="true" immediate="true" valueChangeListener="#{jhsPageLifecycle.updateModelValue}".
The other field has the partialtrigger set to the first field. ie "depends on" selection from JHeadStart file. The value of the second field is set in the setter of the VO RowImpl java file.
The value of that field is only populated on the screen if it is set to disabled="true". This seems a bit bizzare behaviour. Can you explain why it cannot set the value of the field when it is not disabled.
Worked out that if i set the "Clear/Refresh value" attribute on the field that i want updated then it will work ok
Alan
Similar Messages
-
How to set the values to a field?
I have created a page which is used to create the records by using "Add Another Row" button.
If i click on "Add Another Row",a blank row will be created.
The requirement is,after clicking the "Add Another Row" , a default value should be set to one of the fields of the blank row.
Can anybody help me !!!!.
Thanks,
SrinivasIn processFormRequest write the below code
if("addRows".equals(eventName) && "<AdvancedTabldID>".equals(pageContext.getParameter("source"))){
am.invokeMethod("populateValues");
In AMImpl write the below code:
public void populateValues(){
XyzVOImpl vo = getXyzVO();
XyzVORowImpl row = (XyzVORowImpl ) vo.first();
while ( row != null )
if( identify the new ly added row here using some unique id or someother condition etc..)
row.setFieldxyzvalue("set the value here");
row = (XyzVORowImpl ) vo.next();
} -
How can I set default value in a field based on a LOV?
Here's the LOV:
select txtName, ID
from FAC_LK_PROJECT_PRIORITY
order by 1
I tried:
select id from FAC_LK_PROJECT_PRIORITY priority where txtname = 'Medium';
and set the default value type to be PL/SQL function body but that didn't work - I get this error:
ORA-06550: line 2, column 1: PLS-00428: an INTO clause is expected in this SELECT statement
Error ERR-9131 Error in PLSQL function body for item default code, item=P19_PRIORITYID
OK
The item is a select list w/ db column as source: PRIORITYIDHi Scott. thanks for answering. I get from your post that I need to declare a variable and then return something. I changed it to this
declare v_id number := null;
begin
select id into v_id
from FAC_LK_PROJECT_PRIORITY priority
where txtname = 'Medium';
return v_id;
end;and it works.
Why do you use a loop? In case there's >1 row returned by the query? -
Hi all,
I have a requirement where
i need to select a LOV value
and based on that value the field next to it should be generated......
in brief suppose i have a field name EMPLOYEE NO as lov........
as i select the employee number the field next to it assume EMPLOYEE NAME should be retrieved based on the employee number selected..
hope i am clear
waiting for ur responce.....
DEV......Hi,
Assuming you are having two fields on the page. One LOV for empID (ID: empIDV) and messageTextInput for emp Name (ID: empNameV)
1) Create a VO for your LOV having a query like SELECT emp_num, emp_name FROM employees;
2) Create region for LOV using table using wizard based on the VO created above (choose emp_num as messageStyledText and emp_name as formValue). Also make search allowed true for emp_num.
3) Create a LOV map1:
LOV region item: empId
Return item: empIDV
Criteria item: empIDV
4) Create lovMap2:
LOV region item: empName
Return item: empNameV
Also try to implement dependent LOVs : http://sushantsharmaa.blogspot.in/2012/12/10-dependent-lov-in-oaf.html
--Sushant -
Get the the value in input field based upon the fast input field
Hello Experts,
i am new to webdunpro abap.
i have a small doubt in webdynpro.
isuue:- i have two input filed one is for " MATNR" and second input filed " Material Description"
I have to chhose the MATNR by pressing f4 (it is standard search help), it will come from MARA table.
Once it is filled the second inputfiled shoul filled automaticaly base upon the MATNR with readonly mode.
Could any body send me the the splutin or any sample code for this
Thanks in adv!!!Hi Rakesh,
You can Use OVS help to get your requirement done.
Follow the link to know how to use OVS in WDA
link : [http://www.****************/Tutorials/WebDynproABAP/OVS/page1.htm] -
Set the value of a non database field in forms
hai friends ,
Have been struggling a lot with the problem now . Could anyone suggest me how to go about it.
I want to set the value of a field in a form . I know the function set_value and set_value_as_(data type ) does the work . But then is there any constraint on the position where it is called.
My requirement is on querying a form the data from the tables mut be populated( which the portal handles) and I want to populate the non database bound fields with certain values.
Could any one help me out with this ..
nullI need to set value to one of the object attributes if that attribute is blank.This is some kind of a default value that you want, then? If so then just take care of that when you output it. Use <c:if>, and if the attribute is blank then output the default value, otherwise output the attribute.
Or have the servlet that created that request attribute take care of that requirement. -
Setting the value of a newly created subform
I am adding a new subform by calling the instance manager and in the same script, I want to set the value of a field within that newly added subform, but it does not seem to work.
if (condition = true) {
_subformname.addInstance();
form.subform.TextField1.rawValue = "test";
So I add the subform and then try to set the TextField1 (name of a field in my subform)to have a value of test. In fact, I add several subforms in the same script event and what ends up happening is that the data from the very last subform I add gets put into the TextField1 of the very first occurrence I added. Almost like the subforms all get added, but only in memory and you cannot interact with them until the script event you triggered completes. Any ideas would be greatly appreciated.
DaveTry something along these lines:
for (var i = 0; i < 3; i++) {
var myInstance = _sf.addInstance(true);
myInstance.TextField1.rawValue = "test";
Chris
Adode Enterprise Developer Support -
How do I set the value of a dynamic row text field
I have a repeated row form which contains a button and multiple text fields. There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table. I apologize there are multiple questions I have and I am using pseudocode to describe it.
Top form looks like
InputField
| ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
| ButtonXn | ButtonY1 | DescriptionXn
OutputRow looks like
| ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
So I would like it to do
ButtonX1.click
OutputTable.OutputRow.addInstance(true) //this works - everything else I have questions on
OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
Question 1
How do I address the location in each table to set a value
Question 2
How do I get the value of the description field in the same table and row as the button
I would like to say something to the effect of OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
OutputTable.OutputRow.OutputField2 = InputField.rawValue
Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
OutputTable.OutputRow.OutputField3 = this.ButtonLabel
Question 3
How can I get the value of the button's label to set in the field
There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
Question 4 - unrelated to those above.
Is it possible to build the first table
| ButtonX | ButtonY | Description |
from an XML File. I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
So now to answer your questions:
Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
Hope that helps
Paul -
Using Auto Suggest To Set The Value Of Multipe Form Fields
I would like to use the Spry 1.5 Preview Auto Suggest widget
to provide the value for multiple form fields based on the row the
user selects in the auto suggestion data set. I've placed an
example of what I want to do here:
http://www.brucephillips.name/spry/Spry_P1_5_Preview/autosuggest/autosuggestMultipleFields .cfm
It appears that when the user clicks on one of the rows in
the auto suggestion data set, the current row for the data set is
not updated but remains the default (first row in the data set).
Therefore, if you have a spry:detailregion that uses that data set,
the values for that detail region are from the first row in the
data set and not the row the user selected.
Is it possible to set the current row of the auto suggest
data set to the row the user clicked on in the auto suggestion data
set so that the spry:detailregion will have the values from the row
the user clicked on?
I had previously modified the Spry 1.4 Auto Suggest widget to
do this. See:
http://www.brucephillips.name/blog/index.cfm/2006/11/6/Modifing-Sprys-Auto-Suggest-Widget- to-Bind-Users-Selection-to-A-Form
Thank you for any assistance.Cristian: thank you for the reply. I understand your concern
about the user changing the auto suggest field after updating the
complimentary fields. I think that could be handled through user
instruction. Additionally, instead of using form fields to hold the
complimentary data I could use non-editable paragraphs.
I hope the change is not too difficult. I think this
modification would make the auto suggest widget even more useful.
For example think about a product auto suggest. User starts to type
in the name of the product, selects the full product name from the
auto suggestions, and now the page can immediately show in a
spry:detailregion all the product details.
Thanks again for considering my request. I really appreciate
all the work the Spry team is doing. I'm looking forward to the
official release of Spry. -
I'm using Javascript to set the actions. I need to hide a text field if the value of a field in another sub-form is null.
- tried checking the value of the other field for null - doesn't work
- tried setting a variable str2 where I know the value of the other field is available then checking that variable when I initialize the text field - doesn't work
What am I missing?Hi.
Try this in the originating sub form referring to the text field (X).
if (this.rawValue = 1)
X.presence = "visible";
else if (this.rawValue = null)
X.presence = "hidden"; -
How to set the value to non enabled UDF fields
Dear All,
I created a UDF at titile level of PO and that UDF item always disabled (i.e oItem.Enabled=false). Now how can set a value through coding.
I wrote like this:
oForm = SBO_Application.Forms.GetFormByTypeAndCount(-142, 1);
oItem = oForm.Items.Item("U_Poap");
if (oItem.Enabled == false) { oItem.Enabled = true; }
oEdit = ((SAPbouiCOM.EditText)(oItem.Specific));
oEdit.Value = "1";
oItem.Enabled = false;
But system throws an error at : oItem.Enabled=true statement.
How to solve issue.
Thanks in advance
Suresh YerraHi,
You can set the values using datasource object
oDBs_Head = objForm.DataSources.DBDataSources.Item("@TableName")
oDBs_Head.SetValue("U_FieldName", 0, "Value")
regards:
SANDY
Sandeep Saini | Roorkee | India on Dec 26, 2008 11:01 AM -
Setting the value of a single attribute for multiple line items
Hi all,
I am working on a Web Dynpro application, I have created this applicaion for an accounting document so it has header data and multiple line item data. As per the requirement I have to put the following logic:
1. When a user enters a value in the field KBLNR on the line item, all the other fields like cost centerm fund, functional area should populate from a database table based on the value of the KBLNR. to get this I have put the following code:
TYPES: BEGIN OF t_kblp,
fipos TYPE kblp-fipos,
kostl TYPE kostl,
END OF t_kblp.
DATA lv_kblnr TYPE wd_this->element_t_bseg-kblnr.
DATA: lt_kblp TYPE STANDARD TABLE OF t_kblp,
wa_kblp LIKE LINE OF lt_kblp,
lt_bseg TYPE STANDARD TABLE OF bseg,
wa_bseg TYPE bseg.
DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
DATA: ls_t_bseg TYPE wd_this->element_t_bseg,
lo_api_controller TYPE REF TO if_wd_controller,
lo_message_manager TYPE REF TO if_wd_message_manager,
lo_nd_tbseg TYPE REF TO if_wd_context_node,
lo_el_tbseg TYPE REF TO if_wd_context_element,
lt_el_tbseg TYPE wdr_context_element_set,
lv_bseg TYPE bseg.
lo_nd_t_bseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
lo_nd_tbseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
lt_el_tbseg = lo_nd_tbseg->get_elements( ).
LOOP AT lt_el_tbseg INTO lo_el_tbseg.
lo_el_tbseg->get_static_attributes(
IMPORTING static_attributes = lv_bseg ).
IF lv_bseg-kblnr NE ' '.
SELECT belnr
fipos
kostl
PSPNR
geber
saknr
fkber
grant_nbr
gsber
FROM kblp
inTO corresponding fields of wa_kblp
WHERE belnr = lv_bseg-kblnr and
saknr = lv_bseg-saknr.
ENDSELECT.
lo_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
* get element via lead selection
lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
lo_el_tbseg->set_static_attributes(
EXPORTING static_attributes = wa_kblp ).
CLEAR: lv_bseg, wa_kblp.
ENDLOOP.
everything is working fine but now the problem is couple of fields that I have in wa_kblp are with different names in bseg table and hence they are not updating... I tried putting the following logic within the loop :
lo_el_t_bseg->set_attribute(
name = `PROJK`
value = wa_kblp-pspnr ).
but it's only setting the value of the first line item and not working for the multiple line items, can you please tell me how can do this?
Thanks,
Rajat Garg
Edited by: rajatg on Jun 24, 2011 5:09 PMHi Chris,
I tried your code and it worked fine but after I put this code I am getting another issue. within the loop I had a code to make the fields non modifiable on the screen and was working fine but now what's happening is it's making the all the lines uneditable except the one with data on it (which is completely opposite), this is what I have coded:
LOOP AT lt_el_tbseg INTO lo_el_tbseg.
lo_el_tbseg->get_static_attributes(
IMPORTING static_attributes = lv_bseg ).
IF lv_bseg-kblnr NE ' '.
SELECT belnr
fipos
kostl
PSPNR
geber
saknr
fkber
grant_nbr
gsber
FROM kblp
inTO corresponding fields of wa_kblp
WHERE belnr = lv_bseg-kblnr and
saknr = lv_bseg-saknr.
ENDSELECT.
move: wa_kblp-belnr to wa_bseg-kblnr,
wa_kblp-fipos to wa_bseg-fipos,
wa_kblp-kostl to wa_bseg-kostl,
wa_kblp-pspnr to wa_bseg-projk,
wa_kblp-geber to wa_bseg-geber,
wa_kblp-saknr to wa_bseg-saknr,
wa_kblp-fkber to wa_bseg-fkber,
wa_kblp-grant_nbr to wa_bseg-grant_nbr,
wa_kblp-gsber to wa_bseg-gsber,
lv_bseg-dmbtr to wa_bseg-dmbtr.
append wa_bseg to lt_bseg.
lo_nd_edit_property = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG.EDIT_PROPERTY` ).
get element via lead selection
lo_el_edit_property = lo_nd_edit_property->get_element( ).
lo_el_edit_property->set_attribute(
name = `EDIT_FIELD`
value = 'ABAP_TRUE' ).
lo_el_edit_property->set_attribute(
name = `EDIT_WBS`
value = 'ABAP_TRUE' ).
endif.
endloop.
o_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
get element via lead selection
lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
CALL METHOD lo_nd_t_bseg->bind_table
EXPORTING
new_items = lt_bseg.
Can you please see what I am doing it wrong here.... -
Setting the value of dropdown according tio 1st dropdown values
Hi All,
I have a requiremnt.
My code is like this.
DATA: LV_GROUP TYPE QCODEGRP,
LV_CODE TYPE QCODE,
LV_GROUP_FIELDNAME(30) TYPE C,
LV_CODE_FIELDNAME(30) TYPE C.
§ 4.The event DOUBLE_CLICK provides parameters for row and column
of the click. Use row parameter to select a line of the
corresponding internal table.
" break-point.
FIELD-SYMBOLS TYPE LVC_T_MODI.
DATA: LS_MODI TYPE LVC_S_MODI.
CASE E_FIELDNAME.
WHEN 'PART_CODE' OR 'PART_GROUP'.
PERFORM F4_GET_CATALOG_SELECTION USING TQ80-OTKAT
CHANGING LV_CODE
LV_GROUP.
LV_GROUP_FIELDNAME = 'PART_GROUP'.
LV_CODE_FIELDNAME = 'PART_CODE'.
WHEN 'JOB_CODE' OR 'JOB_GROUP'.
PERFORM F4_GET_CATALOG_SELECTION USING TQ80-FEKAT
CHANGING LV_CODE
LV_GROUP.
LV_GROUP_FIELDNAME = 'JOB_GROUP'.
LV_CODE_FIELDNAME = 'JOB_CODE'.
WHEN 'ACTIVITY_CODE' OR 'ACTIVITY_GROUP'.
PERFORM F4_GET_CATALOG_SELECTION USING TQ80-MFKAT
CHANGING LV_CODE
LV_GROUP.
LV_GROUP_FIELDNAME = 'ACTIVITY_GROUP'.
LV_CODE_FIELDNAME = 'ACTIVITY_CODE'.
WHEN OTHERS.
EXIT.
ENDCASE.
FORM F4_GET_CATALOG_SELECTION USING P_CATALOG
CHANGING P_CODE
P_GROUP.
DATA:
LV_CATALOG LIKE QKAT-KATALOGART,
LV_H_CODE LIKE VIQMFE-FECOD,
LV_PICK TYPE C,
LV_RETN TYPE C,
LV_DISP TYPE C,
W_NOTIF_CATALOG LIKE LINE OF G_NOTIF_CATALOG,
I_CODEGRP LIKE QPK1CODEGRP OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF I_QPK1CD OCCURS 10.
INCLUDE STRUCTURE QPK1CD.
DATA: END OF I_QPK1CD.
LV_CATALOG = P_CATALOG.
LV_H_CODE = '*'.
LV_PICK = 'X'.
LOOP AT G_NOTIF_CATALOG INTO W_NOTIF_CATALOG WHERE QKATART = LV_CATALOG.
MOVE W_NOTIF_CATALOG-QCODEGRP TO I_CODEGRP-CODEGRUPPE.
APPEND I_CODEGRP.
ENDLOOP.
CALL FUNCTION 'QPK1_GP_CODE_SELECTION'
EXPORTING
I_KATALOGART = LV_CATALOG
I_CODEGRUPPE = CDGRP
I_CODE = LV_H_CODE
I_SPRACHE = SY-LANGU
I_PICKUP_MODE = LV_PICK
I_DISPLAY_MODE = LV_DISP
I_RETURN_IF_ONE = LV_RETN
TABLES
T_QPK1CDTAB = I_QPK1CD
T_CODEGRPTAB = I_CODEGRP
EXCEPTIONS
NO_MATCH_IN_RANGE = 01
NO_USER_SELECTION = 02
NO_AUTHORIZATION = 03
NO_SELECTION_SPECIFIED = 04
OBJECT_LOCKED = 05
LOCK_ERROR = 06
OBJECT_MISSING = 07.
CHECK SY-SUBRC = 0.
READ TABLE I_QPK1CD INDEX 1.
P_CODE = I_QPK1CD-CODE.
P_GROUP = I_QPK1CD-CODEGRUPPE.
My requirement is that I want to set the values of job_group and activity_group equal to values of part group drop down. I want to just select the value of part_group from the f4 option and other values should auto populate with same values.
Please help.
Thanks in Advance,
Hariom.Hi Hari,
Check the below thread
populate drop down menu based on entry in another field
Cheerz
Ram -
Deriving 1 Value from 2 Fields Based on Values in Fields
I have a query that needs to return 1 of my values based on the values from 2 fields from 2 tables. However, the value should only be returned in 1 field and one of the fields should be evaluated first. If this first evaluated field has a certain value ('Y') then the other field is ignored.
To be more clear, per the normal query below, what I want is to somehow, if possible, combine the case t2.el_contr and case t1.contr_type statements so that one field, say: mbr_contr_type_desc returns a value.
So that if the value of t2.el_contr is 'Y' then 'SUB CHILD' is returned. It is important that this field should be evaluated first (If the value of it is 'Y' then the other field evaluation can be ignored). If this is not 'Y', then t1.contr_type should be evaluated and the values as listed below also returned to mbr_contr_type_desc.
I know the following isn't correct, but it might better illustrate what I'm trying to do (the normal query is below this)
case t2.el_contr
when 'Y' then 'SUB CHILD'
case t1.contr_type
when 'A' then '1 PARTY MALE SUB'
when 'B' then '1 PARTY FEMALE SUB'
when 'C' then '2 PARTY MALE SUB'
when 'D' then '2 PARTY FEMALE SUB'
when 'F' then 'FAMILY MALE SUB'
when 'G' then 'FAMILY FEMALE SUB'
end as mbr_contr_type_desc
In an Access query I would do the following in a column:
iif([el_contr]='Y',"SUB CHILD',SWITCH([contr_type]="A","1 PARTY MALE SUB",[contr_type]="B" etc.))
*NORMAL QUERY*
select t1.ssn
t1.type,
t1.grp_id,
t1.contr_type,
t2.el_contr,
case t2.el_contr
when 'Y' then 'SUB CHILD'
end as mbr_contr_type_desc_2,
case t1.contr_type
when 'A' then '1 PARTY MALE SUB'
when 'B' then '1 PARTY FEMALE SUB'
when 'C' then '2 PARTY MALE SUB'
when 'D' then '2 PARTY FEMALE SUB'
when 'F' then 'FAMILY MALE SUB'
when 'G' then 'FAMILY FEMALE SUB'
end as mbr_contr_type_desc_1
from member_elig t1
inner join grp_master t2 on
t1.grp_id = t2.grp_idPerfect!
Thanks, didn't know that existed. Still learning my way around pl/sql..
One other (unrelated) question..when i hit the CTRL+LEFT ARROW* button in my SQL window, it will not tab back. This is really annoying! I have looked through PREFERENCES-EDITOR and can't seem to find any setting that will allow this. Do you know of any way to change this so I can tab backwards/fowards through code in the SQL window?
Thanks for any suggestions!
*Or CTRL+RIGHT ARROW for that matter.. -
Acrobat XI - Populating value of a field based on another field
pdf built in Acrobat XI
New to this and I have tried every possible combination I can think of! For simplicty purposes, I have two text fields, Text1 and Text2. I want Text2 to populate based on the value entered into Text1. Have an Action event (Mouse Up) on Text1 as follows:
var OneT = this.getField("Text1");
var TwoT = this.getField("Text2");
TwoT.value=OneT.value;[Moved to Acrobat JavaScript forum]
If you name each field the same, the values will automatically be the same. But if you want to be able to change the value of Text2 after it is autopopulated, you should use a different script and a different event. The following custom Validate script for Text1 will set the value of Text2 when the value of Text1 changes:
//Custom Validate script for Text1
getField("Text2").value = event.value;
If you only want to set the value of Text2 when it is blank, the code could be:
// Custom Validate script for Text1
// Get a reference to Text2
var f = getField("Text2");
// Only set it value if it is currently blank
if (!f.valueAsString) {
f.value = event.value;
This allows the user to change the value of Text2 without it getting reset when Text1 is changed.
Maybe you are looking for
-
What is the best Safari Version for OS 19.9.5 Maverick on a MacBook Pro. 2.4 Ghz, with 8 gb memory?
-
Compiling / Running a Java file in JSP
Hi, ok, I have a jsp page, which we will call page 1. Once I go to that page, I all I want it to do is compile a certain file.java, and then run the file.java. The user doesn't actually know that this is going on in the background. Page 1 automatical
-
Updraded to iTunes 8.0.1, lost 3/4 of my library
I did the upgrade to iTunes 8.0.1, all went well, when I opened iTunes folowing the upgrade, most of my library was missing. This included both albums imported from CD's and also purchased music from iTunes itself. I tried a restore back to the origi
-
I live close to US border and my iPhone4 insists on connecting to AT&T. I can't seem to disable it!
-
Create Report Layout File from page
I am trying to mimic the Report layout create from my APEX page. The process is referencing wwv_flow_report_layouts, but it won't compile on my page. Am I able to insert into this from APEX page (insetad of builder)? declare l_report_layout clob; l_r