Show / hide field based on text in another field
Hi,
I'm trying to make one of my fields reactive to what is the text generated in another field.
At the moment I have this under calculate using custom javascript:
var Mask = this.getField("Course").value;
if(Mask == 'Swimming') this.getField("Code").display = display.visible;
else this.getField("Code").display = display.hidden;
Whereas Course is the field that is changing and Code is the one that will show/hide based on content of Course.
Any help?
Hi Everyone,
After doing trials with simple calculations it still wasn't working and so I've figured out what the problem is - the document was being exported but with the data being pre-populated from an SQL database in which during the export it all happens at once, not a chain effect so when the export happens it was filling "Code" before "Course" had any info in it...
The fix was basically having to create a different field in the SQL source itself for an independent field on the pdf form.
Similar Messages
-
Fill in fields based on response in another field.
Is there a way to use one field to automatically fill in another field? For example, I have two fields (Project Name & Project Address). Project Name is a pull down menu. Can I have Project Address automatically fill in based on their choice of Project Name?
Thanks,
MikeCheck the following link , you may get an idea to solve your problem
mapping an EO to a view ?
-Krishnamurthy -
Using Javascript to show/unshow a field based on input in another field
I want to display/not display a field in a JSP depending on what is selected in another field.
I am using <div></div> element currently which is displayed/not displayed using a Javascript invoked by the first field.
the problem with div is that I have to put it inside a <tr><td> otherwise it doesn't work. This makes the field look aloof from the rest of the page, and is also not aligned with the other fields.
Is there anything other than <div> that can be used? or is there a way to correct the look of the field inside a div?
ThanksYou shouldn't have to put it inside a <tr><td> to get it to work. I've done what you are trying to do with <span></span> and it worked fine. I haven't tried it with a <div> but I can't image why that wouldn't work. Maybe you could post your code.
-
Populate field based on selection from another field?
I'm using a Data Connection with a SQL query that returns two fields (StNameFull and ADDRKEY). I have a drop-down list called "Address" with the list items dynamically bound to StNameFull, so the user can select the address.
What I'm trying to do is populate the second field "Key" with the corresponding record, based on the selection made from the drop-down list.
Is it possible to script this so that when the Address is selected the Key will automatically fill in with the key that matches the address selcted?
I currently have "Key" as a text field bound to ADDRKEY, but not sure how to have it check what was selected in "Address"
Thanks so much,
- KevinYes it is possible but you will have to write some script to do it. You wil also have to ge the DataConenction to execute a SQL statement. There is a good blog on this topic at this location:
http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
Paul -
Sum Fields based on change in another field
I have data that looks like this
<Records>
<VBLEN>123</VBLEN>
<MATNR>012356</MATNR>
<ZSPR>1.02</VBLEN>
</Records>
<Records>
<VBLEN>123</VBLEN>
<MATNR>568954</MATNR>
<ZSPR>2.05</ZSPR>
</Records>
<Records>
<VBLEN>856</VBLEN>
<MATNR>259865</MATNR>
<ZSPR>5.98</ZSPR>
</Records>
<Records>
<VBLEN>856</VBLEN>
<MATNR>359874</MATNR>
<ZSPR>4.12</ZPSR>
</Records>
<Records>
<VBLEN>856</VBLEN>
<MATNR>985698</MATNR>
<ZSPR>1.06</ZSPR>
</Records>
In my output, I have a field on every line that is a total. So My output needs to look like this.
<Records>
<VBLEN>123</VBLEN>
<MATNR>012356<MATNR>
<ZSPR_TOTAL>3.07</ZSPR_TOTAL>
</Records>
<Records>
<VBELN>123</VBLEN>
<MATNR>568954</MATNR>
<ZSPR_TOTAL>3.07<ZSPR_TOTAL>
</Records>
<Records>
<VBLEN>856</VBLEN>
<MATNR>259865</MATNR>
<ZSPR_TOTAL>11.16</ZPSR_TOTAL>
</Records>
<VBLEN>856</VBLEN>
<MATNR>359874</MATNR>
<ZSPR_TOTAL>11.16</ZSPR_TOTAL>
</Records>
<Records>
<VBLEN>856</VBLEN>
<MATNR985698</MATNR>
<ZSPR_TOTAL>11.16</ZSPR_TOTAL>
So I need the sum of ZSPR on each line, but it has to be the sum of ZSPR for each instance of VBLEN.Hi Dave,
If you are using below graphical mapping logic , you have to apply some logic (shown below ) for remaining fields of output.
For getting Total sum value based on VBLEN :
For arranging remaining fields of output xml :
Note : ZSPR_TOTAL is mentioned as Total.
Thanks
Hari. -
How to display f4 help for a field based on value of another field
Hello All,
I have 4 fields : Sales Org : VBAK-VKORG, Distrib Channel : RV50A-VTWEG, Div : RV50A-SPART, Sold-to-party : KUAGV-KUNNR.
The second field depends on the first one, the third on the second one and the fourth on the first field.
However, when each of the second third and fourth fields' f4 help is displayed, the values are independent of the previous fields. How do I set the f4 help to display values based on the respective fields?
Regards,
MithunPlease be sure that you are searching the forums before posting. This exact same question was asked just yesterday:
F4 help to input field
In particular study the section and the linked help document for ddic search helps export/importing parameters and the requirements for DDic Structure/table usage for the parameter mapping. -
Populate f4 values of a field based on value of other field
Hi,
I have created select options using WDR_SELECT_OPTIONS.For one of the fields ,f4 values should be based on value of another field in the screen.
How will i achceive this requirement.
I got a link about the same but that is not using WDR_SELECT_OPTIONS
http://www.sdn.sap.com/irj/scn/logon?redirect=/irj/scn/wiki?path=/display/WDABAP/Using%20Search%20help%20attachments%20for%20WebDynpro%20ABAP
I got another link
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/606288d6-04c6-2c10-b5ae-a240304c88ea?quicklink=index&overridelayout=true
which I am going to try
Thanks
Bala Duvvuri
Edited by: Bala Duvvuri on Jun 22, 2011 6:49 AMHi,
Using OVS you can achieve this., In OVS Event Handler read the value based on which you want to display F4 for other field and populate the values based on the first field.
this link is fine., go through this: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/606288d6-04c6-2c10-b5ae-a240304c88ea?quicklink=index&overridelayout=true
hope this helps u.,
Thanks & Regards,
Kiran -
Numeric format based on data in another field
I am trying to set up a form where the numeric format of one field is based on units of measure in another field. The fields are: units1 and iq1. What I want to do is have the iq1 field format for percent with two decimal places when units1 is LS or ls or L.S. or l.s. otherwise the field should be formatted for a number with the format nnn,nnn,nnn.nn. Any help for this newbie is appreciated.
I think this is what you are looking for:
Make sure that you select "Commit selected value immediately" in the options tab of the drop down menu.
//Place this script in the custom validation script of the drop down menu
//Create a text field caleld Text2
var MySelection = event.value;
switch (MySelection) {
case "Accountability":
this.getField("Text2").value = "Accepts personal responsibility for the quality and timeliness of work. Can be relied upon to achieve results with little need for supervision. ";
break;
case "Compliance":
this.getField("Text2").value = "Complies with policies, procedures, workflows and instructions.";
break;
I hope this helps. -
Field Populates based on Selection in Another Field
Hi everyone,
I have created a new position description template using a pdf form. In this form I have various fields. I would like to populate one field based on what I have selected in another field. For example, I have a field called competency. In this field I can select and choose a competency. If I select "Accountability" I would like the description field to say " Accepts personal responsibility for the quality and timeliness of work. Can be relied upon to achieve results with little need for supervision. " alternatively if I select "Compliance" I would like the description field to say "Complies with policies, procedures, workflows and instructions." Can anyone assist me with script or is there another way of making this happen.
Thanks in advanceI think this is what you are looking for:
Make sure that you select "Commit selected value immediately" in the options tab of the drop down menu.
//Place this script in the custom validation script of the drop down menu
//Create a text field caleld Text2
var MySelection = event.value;
switch (MySelection) {
case "Accountability":
this.getField("Text2").value = "Accepts personal responsibility for the quality and timeliness of work. Can be relied upon to achieve results with little need for supervision. ";
break;
case "Compliance":
this.getField("Text2").value = "Complies with policies, procedures, workflows and instructions.";
break;
I hope this helps. -
Assigning a Numeric Value in a Cell Based on Text in Another Cell
In advance, thanks for your assistance. I'm trying, in vain, to assign a numeric value in a cell based on text (from a dropdown menu) in another cell. For example, in cell A5 I have a dropdown list that includes the options "blue", "red", "white", and "gold." I want cell C15 to be 2 if A5="blue"; I want C15 to be 0 if A5="red"; I want C15 to be 2 if A5="white"; and, I want C15 to be 1 if A5="gold."
Tippet,
This is a job for LOOKUP.
The expression for the Result cell is: =LOOKUP(A2, Lookup :: A1:A4, Lookup :: B1:B4)
The aux. table contains the matches that you assign for the colors.
Regards,
Jerry -
Need help - script to continue text in another field if necessary
Wish I could attach my form but it's not available. I am using Adobe Acrobat 9.0. I have a form with two text fields for "Other" information that needs to be shared. If the user types in more characters than the box holds the overflow text doesn't print. These are court documents and all the text has to print somehow. I am trying to figure out a work around for this and wondered if a script can be written to put the extra text from each "Other" field into another field that would open on a new page at the end of the document if necessary. I want to avoid having extra empty pages however so if they can be added ONLY if the text needs to overflow. I hope I explained this okay, like I said I wanted to upload the form but can't. If someone can help me with this I would really appreciate it.
LiveCycle is a part of Acrobat Pro Extended - Windows users only, not Mac.
OctRita wrote:
… would it be possible to have a page at the end with a text field for each of the ones that need overflow to print and can a javascript be written to put the extra text into those fields?
Yes, it is possible - I've already indirectly provided you with the code for that via the link in my post. Just remember to save it to your desktop:
http://www.adirect.dk/adobeforum/commentfields.pdf
As an alternative you could remove the limited characters, set the field to multiline and make a script that set the textsize to auto if the user fills the field with text. When textsize is set to auto, the text will keep on shrinking as user types more text.
Torben. -
Dynamic action - show/hide region based on LOV which returns ID
Hi folks,
this should be simple, so someone who works with dynamic actions.
I have a LOV which is based on below query:
select OBJECT_ID, KOD
from x_data x;
retuns:
ID KOD
492961 BMW
492964 VOLVO
492960 MERCEDES
492963 VOLKSWAGEN
492959 SKODAItem :P200_KOD is based on LOV which displays KOD and returns ID.
On my page I have also 1 region called TEST_REGION.
I would like to set up a dynamic action shich will SHOW/HIDE a TEST_REGION based on selected value in item :P200_KOD (LOV). Region should be showed if displayed (KOD) value of selected ID starts with 'V%'
By other words, if below query returns any record, then SHOW, else HIDE:
select *
from x_data x
where x.kod like 'V%'
and x.object_id = :P200_KOD;How should I define a triggering condition for dynamic action, for item :P200_KOD?
Thanks,
TomasHi,
One way:
Create advanced dynamic action.
Name : Hide region
Event : Change
Selection Type : Item(s)
Items(s) : P200_KOD
Condition : JavaScript Expression
Value :
$(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"Action : Hide
Fire On Page Load : True
Hide all page items on the same line : No
False Action : Show
Fire On Page Load : True
Show all page items on the same line : No
Selection Type : Region
Region : TEST_REGION
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0 -
How to show/hide total based on selected column in column selector
Hello,
Is there a way to show/hide the total based on what column is selected in the column selector? Or alternatively to hide the total based on the column selected? I'm using OBIEE 10g.
Basically, I have a pivot table with a handful of row variables and one measure. Then I allow the user to select the column variable. The default is to have nothing, which I have achieved using the hidden/dummy column trick (Re: How to add new columns by using Multiselect However, if my pivot table is set to have a total, I now get 2 columns that are the same. When the user selects any other choice (e.g. gender), I would want to see Male, Female and the total. Something like this:
Default:
Count
East 10
West 20
Total 30
Gender:
Male Female Total
Count Count Count
East 6 4 10
West 14 6 20
Total 20 10 30
Any thoughts?
Thanks!I recommend using view selector instead of column selector
-
F4 Help on one field should populate data on another field
Dear All....
I am using the FM - F4IF_INT_TABLE_VALUE_REQUEST for F4 help on one field of the selection screen. Based on the selected value, a values corresponding to it should appear on another field.
My Code -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_svn.
SELECT qmnum serialnr
INTO TABLE t_qmel
FROM qmel
WHERE qmart = 'ZD'.
SORT t_qmel BY qmnum.
Display the f4 Help Values for SVN
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'QMNUM'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_SVN'
window_title = text-015
value_org = 'S'
TABLES
value_tab = t_qmel
return_tab = t_retval.
READ TABLE t_retval INTO w_retval_wa INDEX 1.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_retval_wa-fieldval
IMPORTING
output = w_qmel_wa-qmnum.
w_retval_wa-fieldval = w_qmel_wa-qmnum.
READ TABLE t_qmel INTO w_qmel_wa WITH KEY qmnum = w_retval_wa-fieldval
BINARY SEARCH.
IF sy-subrc = 0.
p_esn = w_qmel_wa-serialnr.
ENDIF.
ENDIF.
But this is however not working.
Please let me know where I am going wrong.
I have serached SDN thoroghly but could not get my solution.
Please guide me....
Regards,
Pankaj Agarwal.*& AT SELECTION SCREEN ON VALUE-REQUEST FOR FIELD
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ebeln.
PERFORM f4_hlp_ebeln.
*& Form F4_HLP_EBELN
text
--> p1 text
<-- p2 text
FORM f4_hlp_ebeln .
TYPES: BEGIN OF ty_ebeln,
ebeln TYPE ebeln ,
END OF ty_ebeln.
DATA: lt_ebeln TYPE TABLE OF ty_ebeln.
CLEAR: lt_ebeln[].
SELECT ebeln
FROM zmt_po_mic_ded
INTO TABLE lt_ebeln.
IF sy-subrc = 0.
SORT lt_ebeln[] BY ebeln.
DELETE ADJACENT DUPLICATES FROM lt_ebeln COMPARING ALL FIELDS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'EBELN'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_EBELN'
value_org = 'S'
callback_program = sy-repid
TABLES
value_tab = lt_ebeln[]
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " F4_HLP_EBELN
DATA: t_dynfields TYPE TABLE OF dynpread,
t_valhlp TYPE TABLE OF ty_valhlp.
DATA: w_dynfields TYPE dynpread.
CLEAR: t_dynfields[], t_valhlp[].
DATA: l_ebeln TYPE ebeln.
w_dynfields-fieldname = 'P_EBELN'.
w_dynfields-fieldvalue = p_ebeln.
APPEND w_dynfields TO t_dynfields.
CLEAR w_dynfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = c_x
TABLES
dynpfields = t_dynfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE t_dynfields INTO w_dynfields INDEX 1.
IF sy-subrc = 0.
l_ebeln = w_dynfields-fieldvalue.
SELECT ebeln
ebelp
FROM ekpo
INTO TABLE t_valhlp
WHERE ebeln = l_ebeln.
IF sy-subrc = 0.
SORT t_valhlp[] BY ebeln ebelp.
here we get the value of ebelp depending on the selection of EBELN ***
endif.
ENDIF. -
Change value in a field and reflect value of another field
Hi all,
I have a situation here where in the Single Customer View, under the Completed Task. When I changed the value of a field name called Status to "Completed" in the Edit screen and I save it, another field that is in the same screen called "Completed Date" will auto populate the current date as value. may I know how do I achieve this?
Thanks and appreciate for help
Regards,
AnsonHi !
You've got to create a workflow rule on Activity with the event trigger Before modified record saved.
The condition will be like this :
*[<Status>]=LookupValue("EVENT_STATUS", "Completed") AND [<Status>]<>PRE('<Status>')*
Then the action of this rule will update the field *"Completed Date"* with the value Today().
But you don't have to do it for the completed date field, because it's already filled automatically when you change the status to completed.
Hope this will help, feel free to ask more !
Max
Maybe you are looking for
-
Customer-Specific Key Figure and MCI3 analysis report
Hi, We have created a "Customer-Specific Key Figures" in customizing and mapped the key with value category. But this new defined key figure is not available in the report MCI3. How to get this figure in the analysis report MCI3 etc , i.e. how to upd
-
How to track iPhone with serial number?
-
Map Builder Import Metadata problem
Hello, I'm having troubles trying to import metadata from map builder (importing from an export file built by map builder too). To better explain, I made a sample path to repeat the process: Using MVDEMO sample data, if I add a new style color (i.e.
-
I am getting error messages whenever I try to edit KEYWORDS for my photos in bridge. I succesfully added keywords to about 3,000 jpeg images a week ago. Then after importing a bunch of raw images I get error messages extremely frequently when trying
-
Why are my RMAN backup files still around?
Environment: Oracle 11.2.0.3 EE on Solaris 64-bit Good Morning (at least it's morning here at the moment), I have a test database that I currently have set up to do an Incremental Level 0 backup every morning at about 03:00. I also do an 'archivelog