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 advance
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.
Similar Messages
-
Populate a dropdown based on selected in another dropdown in a seperate table
Good Day All;
This may sound like a simple question to most, but… It has had me frustrated trying to figure out.
I am trying to populate a dropdown based on what is selected in another dropdown.
Let me explain what I have done so far.
LifeCycle Designer 8.05.2
When I had both dropdowns in the same table, I did not have a problem. The code I used is
Table name is “Table1”
if(directorate.rawValue == "1")
division.clearItems();
division.addItem("select")
I was asked to move things around and now “division” is located in “Table2”
I know I need to reference “Table1” but I am running into a Syntax error. I have tried the following code;
if(Table1 Row1 directorate.rawValue == "1")
division.clearItems();
division.addItem("Faire un choix")
if(Table1.Row1.directorate.rawValue == "1")
division.clearItems();
division.addItem("Faire un choix")
Any help would be appreciated
ChompYou're missing a semicolon at the end of the addItem line, and on the second code sample you've got no periods in the SOM reference (Table1 Row1 directorate).
The easiest way to get the path to another field is to ctrl-click on the field while you are in the script editor. -
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 -
Clearing Value in one Prompt based on selection in another
Hello,
I have 2 prompts in my BEx query designer for same characterstics ( one is single value, characterstic variable and another one is Hierarchy node variable ). During the query execution, If user selects a value in first prompt and goes to the other prompt and selects a value, i need to clear the selected value in the first prompt. And vice versa as well.....
Please suggest.Jagan,
Let me explain my isue in detail...
I have created 2 variables for the same characterstics and both of them are ready for input. One variable is of characterstic type and other is Hierarchy node type.
Now, when user executes the query he sees two prompts. Lets say user selects a value for one prompt and then goes to second prompt and selects another value for the second prompt, then i need to clear the values that was selected by him for the first prompt. And vice versa.... -
Create a filtered list based on the selection in another field? URGENT HELP NEEDED
Hi,
Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
many Thanks
LeeThis will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field -
Can't get a text field to atuo populate based upon a dropdown selection
I have a drop down box with 3 values that can be selected:
Dropdown2 = 101-3 subd.A
101-3 subd.B
101-3 subd.C
I am trying to get a text field to auto populate based upon the selection:
if Dropdown2 = 101-3 subd.A then Text4 = "ValueA"
if Dropdown2 = 101-3 subd.B then Text4 = "ValueB"
if Dropdown2 = 101-3 subd.C then Text4 = "ValueC"
I have tried to create a custom calculation script for Text4:
var v= getfiled("Dropdown2").value;
if (v="101-3 subd.A") event.value = "ValueA";
else if (v="101-3 subd.B") event.value = "ValueB";
else if (v="101-3 subd.C") event.value = "ValueC";
else event.value = " ";
I have entered this script and the syntax appears to be correct.(At least to Acrobat XI. I'm know programmer and have just enough knowledge to be dangerous). When I select a value in Dropdown2 nothing happens. No value appears in Text4. I have checked the "commit selected value immediately" in the option of Dropdown2 per some google'ing. I just can not understand why the values do not appear. Any help would be appreciated.
ThanksI made the changes and added the == to my if statements. When I select a value in Dropdown2, Nothing appears in Text4. I don't understand. Is there something else that I need to do beside event.value="Some Value";?
I know it has to be something simple that I am missing, but I just can't seem to see it.
Text4 - Custom Calculation Script:
var v= getfiled("Dropdown2").value;
if (v=="101-3 subd.A") event.value = "ValueA";
else if (v=="101-3 subd.B") event.value = "ValueB";
else if (v=="101-3 subd.C") event.value = "ValueC";
else event.value = " "; -
Populate text in field 1 based on calculation in another field
Hello,
Currently, I have a calculated field that is the sum of 7 numeric fields. I then have a text field that I would like to populate based on the calculation.
For example, if the value in the calculated field (Total) is "27", textfield should read "Great Job". If Total is >27, the textfield should read "Keep Trying".
I have two questions... What script should I try? and Where should the script reside?
I have tried to add script in the 'change' section of the Total field, but since the user is not changing this field (it is calculated), the script is not being triggered. I have tried the script in the 'change' section of each of the 7 numeric fields, but am having trouble referencing the Total field value.
Any help would be appreciated.
Thanks
EEric,
I added 8 Numeric Fields named MonTotal, TueTotal, WedTotal, ThurTotal, FriTotal, SatTotal, SunTotal and WeekTotal.
I added a FormCalc script to the calculate event of the WeekTotal Numeric Field shown below:
form1.#subform[0].MonTotal + form1.#subform[0].TueTotal + form1.#subform[0].WedTotal + form1.#subform[0].ThuTotal
+ form1.#subform[0].FriTotal + form1.#subform[0].SatTotal + form1.#subform[0].SunTotal
Once I saw the calculation was working I inserted a new text field named "Comment" and a standard button (Labeled "Click on Completion" and added a FormCalc script to the click event of the standard button shown below:
if (form1.#subform[0].WeekTotal == 27) then
form1.#subform[0].Comment = "Great Job!!!"
elseif (form1.#subform[0].WeekTotal > 27) then
form1.#subform[0].Comment = "Keep Trying!!!"
endif
Hopefully this is helpful.
Have a great day!
Pam -
How to populate a dropdown box based on a selection in another Dropdown box.
I am trying to find out a way to do the following:
I am using coldfusion ....working on a form. The form has
couple of dropdown boxes. Based on the selection on the first
dropdown box another dropdown box needs to get populated with
different options. These options will be coming from a query. I am
trying to find out the Javascript code for doing this.
Thanks in advance.jchopra,
There's a method to doing what you're wanting to do that I've
used extensively.
Basically, within my code, I start by invoking the method
that returns the data for the dropdown lists. Then, I use the
following code to pour the data returned into a javascript array:
var locArray = new Array(#evaluate(locs.recordcount+1)#);
locArray[0] = new Array('','','','','','','','','',);
<cfloop query="locs">
locArray[#locs.CurrentRow#] = new
Array('#JSStringFormat(locationId)#',
'#JSStringFormat(fkyPolicyId)#',
'#JSStringFormat(locationNumber)#',
'#JSStringFormat(description)#',
'#JSStringFormat(address1)#',
'#JSStringFormat(address2)#',
'#JSStringFormat(zipcode)#',
'#JSStringFormat(city)#',
'#JSStringFormat(state)#';
</cfloop>
Then I wrote a javascript function that is assigned to the
first dropdown's onChange() event. When the user changes the value
that is selected within the dropdown, I use javascript to locate
(using the policyid) the corresponding record in the javascript
array and populate and/or select the appropriate value(s) in the
second dropdown.
If the data returned from the method invocation is too large
to use within a javascript array, you may need to limit the results
that are returned.
Hope this makes sense. If not, please let me know.
ds -
How to populate a table based on a row selection from another table.
Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
ganeshI understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
"EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
Hope this helps. -
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 elements in a drop based on selection made in another drop down
i need to populate elements in a drop based on selection made in another drop down list. have created list models for populating data from R3. I am using PDK for java development.
hi,
to populate the second dropdown from the selection of the first u need to the submit the form on the selection of data from dropdown and based on the selection populate the second dropdown.
If using jspDynpage u can submit the form on the ''onChange" event of first drop down.
If you can let us know what type of application is this i think we can help you in more better way.
Thanks
Ritushree Saha -
Trying to set attribute value based on user selection of another attribute
I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
<jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
<%
RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
RowEditor.createNewRow();
RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
RowEditor.useEditField("OracleId");
RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
RowEditor.useEditField("AreaId");
RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
RowEditor.useEditField("RgnId");
RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
RowEditor.setReleaseApplicationResources(true);
RowEditor.render();
%>
</jsp:useBean>ok, sorry everyone for making it confusing; this is what I am
trying to acheieve;
I would like the user to populate my database with thier
username AND userID. I have a dropdown box with thier username
dynamicly populated already, what I am trying to achieve, is a way
of when the user selects thier username either another dropdown or
a hidden field is automatically populated with the appropiate
userID (to match thier username). Now I could just have two
dropdowns and they select both, but i'd rather avoid the
possibility of mismatches, and that is why I would like it to be
automatic and based on thier username selection...
Does that make sense....? -
Cond display of drop down based on value selected in another drop down form
Hi,
I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
Currently I have 2 drop downs.
First drop down is a list of Jacks from 2000 to 4999...
Second Drop down consists Chassis ranging from 1 to 900..
So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
Can someone please provide me pointers on how to do this..
Thanks,
NehalHi Larry,
Thanks for your response..
Here are the queries for my select lists.
P62_JACK
select list query for Jacks:
select JACK_NUM display_value, JACK_NUM return_value
from CTS_LIST_OF_JACKS
order by 1
P62_CHASSIS_BLADE_PORT
select NETWORKPORT display_value, NETWORKPORT return_value
from CTS_LIST_OF_NETWORKPORTS
order by NETWORKPORT_ID
jacks range from 2000 to 4000
chassis_blade_port ranges from 100 to 900...
Can you please let me know how to do it..
Thanks,
Nehal -
How to display data from a recordset based on data from another recordset
How to display data from a recordset based on data from
another recordset.
What I would like to do is as follows:
I have a fantasy hockey league website. For each team I have
a team page (clubhouse) which is generated using PHP/MySQL. The one
area I would like to clean up is the displaying of the divisional
standings on the right side. As of right now, I use a URL variable
(division = id2) to grab the needed data, which works ok. What I
want to do is clean up the url abit.
So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end all
I want is clubhouse.php?team=Wings.
I have a separate table, that has the teams entire
information (full team name, short team, abbreviation, conference,
division, etc. so I was thinking if I could somehow do this:
Recordset Team Info is filtered using URL variable team
(short team). Based on what team equals, it would then insert this
variable into the Divisional Standings recordset.
So example: If I type in clubhouse.php?team=Wings, the Team
Info recordset would bring up the Pacific division. Then 'Pacific'
would be inserted into the Divisional Standings recordset to
display the Pacific Division Standings.
Basically I want this
SELECT *
FROM standings
WHERE division = <teaminfo.division>
ORDER BY pts DESC
Could someone help me, thank you.Assuming two tables- teamtable and standings:
teamtable - which has entire info about the team and has a
field called
"div" which has the division name say "pacific" and you want
to use this
name to get corresponding details from the other table.
standings - which has a field called "division" which you
want to use to
give the standings
SELECT * FROM standings AS st, teamtable AS t
WHERE st.division = t.div
ORDER BY pts DESC
Instead of * you could be specific on what fields you want to
select ..
something like
SELECT st.id AS id, st.position AS position, st.teamname AS
team
You cannot lose until you give up !!!
"Leburn98" <[email protected]> wrote in
message
news:[email protected]...
> How to display data from a recordset based on data from
another recordset.
>
> What I would like to do is as follows:
>
> I have a fantasy hockey league website. For each team I
have a team page
> (clubhouse) which is generated using PHP/MySQL. The one
area I would like
> to
> clean up is the displaying of the divisional standings
on the right side.
> As of
> right now, I use a URL variable (division = id2) to grab
the needed data,
> which
> works ok. What I want to do is clean up the url abit.
>
> So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end
> all
> I want is clubhouse.php?team=Wings.
>
> I have a separate table, that has the teams entire
information (full team
> name, short team, abbreviation, conference, division,
etc. so I was
> thinking if
> I could somehow do this:
>
> Recordset Team Info is filtered using URL variable team
(short team).
> Based on
> what team equals, it would then insert this variable
into the Divisional
> Standings recordset.
>
> So example: If I type in clubhouse.php?team=Wings, the
Team Info recordset
> would bring up the Pacific division. Then 'Pacific'
would be inserted into
> the
> Divisional Standings recordset to display the Pacific
Division Standings.
>
> Basically I want this
>
> SELECT *
> FROM standings
> WHERE division = <teaminfo.division>
> ORDER BY pts DESC
>
> Could someone help me, thank you.
> -
Syntax for sum in Smart Form based on Selection criteria in Program.
Hi,
We have created smart form for printing confirmation entries in desired format. We have given some selection criteria in the program. Now, we want to do the sum of certain fields in the smart form based on selection criteria given in program and selection screen.
But we are getting wrong sum in the smart form than expected.
When we debug the program during run time, we are getting correct records as per our expectations. But result of sum in the out put is not as per given selection criteria.
Do we need to establish link between "select option" and "Smart form"? How can we use internal table created for select option in the smart form?
Thanks & regards
VijayHi,
There will be no option to sum the values in smartforms, You just have to sum and append the data to internal table and display the internal table data in the form.
Regards,
Satish
Maybe you are looking for
-
Problem cloning hard disk for 10.6 setup
Hi all, I just got Snow Leopard for my office MacBook Pro and for my home MacBook. On both machines I got an error message when trying to install it that my partition scheme is not GUID, so 10.6 won't install. First I worked on the MBP. It has a 250
-
My 12" powerbook logics card crashed. I have a 17". How do I retrieve my internet bookmarks from the 12" by putting it into Target mode on the 12" and looking into the hard drive on the 12"? Where on the 12" hard drive do I go to search for them?
-
I need to put accents (tilde, acute, grave) on any vowel: i, e,u,o,a,y including those which already have a diacritic : ė,ū,ų,ą,ę, į, and those which have a consonant: in, im, il, ir (tilde on the consonant). Is it possible on a Mac book air system O
-
Hi All I newly deploy UCSD 5.2.0.0 OVF on VMware ESXi 6.0 the deployment done correctly and the VM CUCSD based Centos as in CUCSD image and I can login to centos when I trying to login th UCSD with the browser I find that no configuration done(as in
-
Transporting objects ? Please suggest
We have a landscape of DEV, QA & PROD for BI & R/3. So how will the objects move from DEV to PROD, is it from DEV to QA and QA to PROD (OR) DEV to QA and DEV to PROD. Please suggest me the clear process of transportation of BI Objects from DEV to PRO