Populate a drop-down list based on selected in a drop-down list in a separate table
Good day all.
This may seem a simple question for most, but... He had me frustrated trying to figure out.
I'm trying to fill in a drop-down list that is based on what is selected in another drop-down list.
Let me explain what I've done so far.
Life cycle of Designer 8.05.2
When I got the two drop-down lists in the same table, I've not had a problem. The code I used is
The table name is "table1".
if (directorate.rawValue == '1')
{
division.clearItems ();
division.addItem ("select" "")
}
I was asked to move things and now 'division' is located in 'Table2 '.
I know that I need the "Table1" reference, but I'm running into a syntax error. I tried the following code;
if (Table1 Row1 directorate.rawValue == '1')
{
division.clearItems ();
division.addItem ("make a choice")
}
if (Table1.Row1.directorate.rawValue == '1')
{
division.clearItems ();
division.addItem ("make a choice")
}
Any help would be appreciated
Chomp
You are missing a semicolon at the end of the line, addItem, and the second code example, you have no periods in the SOM (Table1 Row1 direction) reference.
The best way to get the path to another field is to ctrl-click on the ground while you are in the script editor.
Tags: Adobe LiveCycle
Similar Questions
-
Need help to parse the xml string to populate the drop-down list
Here is my: problem
I have a hidden text field that contains the text of an xml
<>facilities
< building >
< name > Building A < / name >
< name > building B < / name >
< name > building C < / name >
< name > building D < / name >
< name > building E < / name >
< name > building F < / name >
< name > building G < / name >
< name > building H < / name >
< / build >
< / facilities >My goal is to read this with JavaScript xml string to populate a drop-down list with values of element (name). Does anyone know how script that?
Attached is a sample .xdp
See you soon,.
Jesse
Here is an example of change. I put the code click on the button, so you can see it in operation... You can place this code in the event that makes sense for you. I also added another field to show the DOM (this is for debugging purposes and you can remove this field if you want).
Paul
-
Master the detailed report, complete the columns based on selection LOV
Hello
When creating a master form / retail, I chose "Edit in detail in tables on the same page." The form has a "report of the region" to select the list of employees.
The EMPNO column is filled with "Popup LOV (named LOV)". It works very well.
My requirement is, after selecting an employee, I want other retail JOBS & SAL table fields to be populated with the information of the employee for selected EMP table and must be posted immediately. Is this possible to do? If not, what other solution available to achieve the same functionality?
I tried this in Oracle.
workspace: test_ws_anand
user: anandgp
password: cable123
Watch ""list of skills "on the main menu. "
Thank you
-Anand
Hi Anand,
On the change of employee (employee selection) call Ajax via javascript and set the returned salary and job field.
Here you have two values to return: wages and employment, you can generate json and parse the json in javascript and set the values for the specific field...
Please see the sample code below
Step 1: Create the Ajax application process
Please check Procces Ajax, see line 7 How to assign a value to the variable sent by ajax call
Declare L_JSON_STR varchar2(4000) := null; P_SAL number ; P_JOB varchar2(50); lc_emp_no VARCHAR2(20); Begin lc_emp_no := WWV_FLOW.G_X01; -- code to fetch the salary and commission into p_sal and p_job variable based on selected employee; SELECT sal , job INTO p_sal , p_job FROM emp WHERE empno = lc_emp_no; -- build a JSON string to return L_JSON_STR := '{ "SAL": "'||P_SAL||'", "JOB": "'||P_JOB||'" }'; SYS.HTP.P(L_JSON_STR); End;
Step 2: Create the javascript function
First, you must extract the rowid for which you want to define the work and wages, see line 6, 7, and 8
Step 3 : from selection of employee call the function onchange="javascript:f_fetch_emp_dtls(this);"
Hope this helps you,
Kind regards
Jitendra
-
Dynamic report query table based on selected LOV
Hello
Need some suggestions and Tips how to query dynamically table via lov to report.
Scenario:
Table, TABLE_LIST, a tablename (table in DB) and filter (for where clause) column. The TABLENAME_LOVE is derived from the table TABLE_LIST.
D SELECT TABLENAME TABLENAME TABLE_LIST R
On Page 2, a select list item, page P2_TABLENAME use TABLENAME_LOV
All data tables in the table_list has an identical structure (columns, triggers, primary key and so on).
I want to have the query area of the report of the table based on selected LOV.
Example,
TableName Filter
WBR
CD2 ACTIVE = 'Y '.
When select TB1, regin report ask TB1 on the base.
When select CD2, will interview the report based on CD2 regin WHERE ACTIVE = 'Y '.
Question:
How can I query function & P2_TABLENAME. WHERE & P2_FILTER.
As
Select col1, col2 from P2_TABLENAME WHERE & P2FILTER
Appreciate any suggestions and tips.
TigerwapaHello
You should always put your version of the Apex, version of DB and such other information as suggested in the FAQ.
And now wherever you are referring to report, you need to answer if it's IR or classic.Regarding your query, have you explored the kind of statement "SQL Query (body of function from PL/SQL returning SQL query)"?
This could be a good target for what you're trying to reach.Kind regards
-
Found a Bug? -Select the columns to sort by - but not current table
Just found a problem. Don't know if it's the right place for this but:
-on the spreadsheet (or whatever it's called), when I clicked the sort, the list of columns was for one table OTHER then the one I had open - he had two already selected columns that do not exist in the open table. By clicking on "apply sorting" caused no changes.
-J' have removed the sort criteria and applied so and then reopened the list sort and the wrong table was still in place, but the criteria was allowed.
-J' tried to sort by clicking the buttons in the field headers - but nothing happened - tried several times and in several different areas.
- then I have opened the list sort and he had finally registration of the appropriate table.
It is version 1.5.1 build 5440 against a server 10g.
GlennThe table has the same name as a table that you used previously, including in another schema?
There are a few old bugs where sqldeveloper confused the tables of the same name and used the file layout of table to the wrong table. Those that have been set for most, but it may be something related.
-
"missing the SELECT keyword" error during an insert into the temporary table using the blob value
I'm trying to insert into an oracle temp table using select that retrieves data from a blob field but I get the error: "lack the SELECT keyword.
How we store temporary in oracle result when we make this type of operation (extraction of data in fields and try to load them into a separate table on the fly.?)
with cte as)
Select user_id, utl_raw.cast_to_varchar2 (dbms_lob.substr (PREFERENCES)) as USER my_blob
)
create table new_table as
SELECT user_id,EXTRACTvalue(xmltype(e.my_blob),'/preferences/locale') regional settings
E ETC
----------------------------------------------------------------------------------
BLOB data - value - which is
<? XML version = "1.0" encoding = "ISO-8859-1" ?>
- < Preferences >< time zone > America/New_York < / > zone< displayscheduleinusertimezone > Y < / displayscheduleinusertimezone >< local > Spanish < /locale >< DateFormat > JJ/mm/aaaa < / DateFormat >< timeFormat > hh: mm aaa < / timeFormat >< longformat > Long_01 < / longformat >< doubleformat > Double_01 < / doubleformat >< percentformat > Percentage_01 < / percentformat >< currencyformat > Currency_01 < / currencyformat >< / Preferences >
A WITH clause that must immediately precede the SELECT keyword:
SQL > create table t:
2 with the o as (select double dummy)
3 select * West longitude;
Table created.
-
Hello
When him drag / drop a page in a separate folder name by default is "Untitled extract Pages.pdf", how can I change this default name?
Thanks for any answers that can help!
BR/ H
I could do this drag-and-drop in Acrobat 9 Pro, but it doesn't seem to work in Acrobat Pro XI.
As try67 said, I have not found a way to have the use of the A9 a different name. On a Mac, because the destination folder is "just there" the most straightforward approach is to highlight the file Untitled Pages.pdf extracted, press ENTER, and then type (or paste) the new name.
-
Query to select other records and then the same in 2 tables
Dear all,
My database is 10 gr 2 and OS is Linux.
I have 2 tables with the same fields and almost the same data. There are just a few different lines in table 1 and table 2 that do not match each other.
I need to select these non-matching rows in both tables in a single request.
Kindly help on that.
Best regards, ImranYou have at LEAST two ways!
(SELECT * FROM table_A minus SELECT * FROM table_B) union all (SELECT * FROM table_B minus SELECT * FROM table_A) /
For example:
SQL> create table table_a (col_1 number, col_2 varchar2(5)); Table created. SQL> create table table_b (col_1 number, col_2 varchar2(5)); Table created. SQL> insert into table_a values (1,'A'); 1 row created. SQL> insert into table_a values (2,'B'); 1 row created. SQL> insert into table_b values (1,'X'); 1 row created. SQL> insert into table_b values (2,'Z'); 1 row created. SQL> insert into table_a values (3,'C'); 1 row created. SQL> insert into table_b values (3,'C'); 1 row created. SQL> commit; Commit complete. SQL> SQL> select * from table_a minus select * from table_b 2 union all 3 select * from table_b minus select * from table_a 4 / COL_1 COL_2 ---------- ----- 1 X 2 Z SQL> (select * from table_a minus select * from table_b) 2 union all 3 (select * from table_b minus select * from table_a) 4 / COL_1 COL_2 ---------- ----- 1 A 2 B 1 X 2 Z SQL>
Hemant K Collette
-
How to call user B to drop/create an indexes on a table owned by the user has?
Hello!
We have the following situation:
= > user B has a table that has an index
= > user connects to the database and must have sufficient privileges or the ability to drop/create an index for a table owned by the user B.
Since there are several different schemas in the database, it is not possible to grant the privilege "to create any index' or 'delete any index '.
for the user.
= > to do even more complicated: the necessary procedure must not belong to user B
I tried to solve this problem with a stored procedure (which belongs to user C). Why do we use user C? C the user has several packages,
procedures and functions that get used by other users (for example for purposes of logging, refresh materialized views,...)
So the logic is:
= > user A calls user procedure C. In this procedure the call "run immediately" ALTER SESSION SET CURRENT_SCHEMA = B' "»
is executed successfully. The next step, the < drop index B.i1 > statement would get executed. But this statement fails with the
exception ' ORA-01031: insufficient privileges ".
If this procedure is created in the schema of the user B then everything works fine - but because of our current design of the database, this procedure
must belong to the user C.
Does anyone know a solution to this problem?
Any help will be appreciated
Rgds
JHI think you need the privilege DROP_ANY_INDEX directly to user C.
-
Well I hope I can explain this well enough.
I have a drop down list that has two different options to choose from. For example:
Dropdown1 has: Option has
Option B
On the other page, I have two text fields. TextField1 shows just what is levied on the Dropdown1 (Option A or Option B). TextField2 must do the following: If Option A is taken I just need the field to remain a Virgin. If Option B is taken out I need to fill a specific text.
I thought that I found a way to do it, but it seems that since it's on another page the script will not pull.
Any help is very appreciated!
Hello
You can download Acrobat.com and then publish the form. Once you have published, you can copy the link and share it here.
In my example, I used the name of the first object "TextField1" for example. If your first object is named differently, you will have to modify the script accordingly.
There is an example on how to reference objects here: http://assure.ly/kUP02y.
Niall
-
Automatically populate a drop-down list by using another selection from the drop-down list box
I currently have a menu drop-down box 1 (Occupation) with three options: "enter your own description/blank", retired housewife. When someone chooses either retirement or anyone at home, I would another drop box 2 (employer) to assign automatically "n/a. . The employer drop box has only two options: "enter your own/blank", N/A.
Far, I could for that box to fill but only when the person clicks in the box (as if they were about to enter their own text.) Then only it will fill the drop-down list "employer." I would like it auto fill once the person has chosen retired, Virgin or stay-at-home woman without having to enter in the box (just using the arrow to the size of the drop-down list box).
I currently have a key shot that resets the employer box when a person chooses the option vacuum/enter your own option. I then a JavaScript (only for the housewife now) that only works if you click the box of. Key combination works I want to than the other options work as well. If the client settles on white, the choice of the employer updates automatically empty without having to click in the box of. Any help (including general advice to make my code cleaner) is very appreciated!
Current script of typing:
If {(event.willCommit)
If (event.value == "") this.resetForm (["use"]); of other SetFieldValues (event.value);
}
The current upward, mice running JavaScript :
var v = this.getField ("Occupation") .value
If (v is "Housewife")
- this.getField("Employer").value = "N/a".
I think maybe I should use event.willCommit in my formula, but I'm not sure how to include it.
Thank you!
I would not use the key sequence or MouseUp actions for this, but the action post.
Just make sure that you set the field option to validate the selected value immediately (under Properties - Options) and then use this code as the custom validation script:
var employerField = this.getField("Employer"); if (event.value=="Homemaker" || event.value=="Retired") employerField.value = "N/A"; else employerField.value = employerField.defaultValue;
-
I created a drop down list which includes various regions. When a region is selected it auto-renseigne another drop-down list with places. I would like to automatically fill a text field with predetermined phone numbers when you have selected a location in the drop-down list of "places". I want to integrate the phone numbers in the code, since the form will not access a database. Any help would be greatly appreciated. Thank you, Ed.
Hello
Here is the link to your form. https://Acrobat.com/#d=BaCL7BKKdAcgV3JIk61nZg
You have the updated field matches in the event changes from the 2nd menu drop-down.
While referencing you use .page1 while your page is Page1.
Thank you.
Sidonie.
-
values of insertion to the db based on selected drop-down list
Hello I am currently adding values to the database based on a selection in the menu dropdown.
is all that I need.
This does not work properly. Thanks for any help
My goal is if they choose one of the following
Toyo
Hon
Suba
It will be inserted into the db.
Thank you
<!----------------
Cardaddform.cfm
has a list dropdown and based on the falling down of the selected list, it assumes that to fill the
Car_dbTEST db
Table of Car_tab
car_make field
with values
Honda
or
Toyota
or
Subaru.
This is the page: - >
< html >
< head >
< title > car add brand < /title >
< link rel = "stylesheet" href = "styles.css" >
< / head >
< body >
< h1 > < / h1 >
< table >
< action = "CarAddAction.cfm cfform" method = "POST" > "
< b >
Car < td > < table >
< td >
< SELECT name = "CarMake" size = "1" >
< OPTION Value = "Toyo" > please select < / OPTION >
< OPTION Value = "Hon" < cfif Carmake is 'Honda' > selected < / cfif > > Honda < / OPTION >
< OPTION Value = "Toyo" < cfif Carmake is 'Toyota' > selected < / cfif > > Toyota < / OPTION >
< OPTION Value = "Suba" < cfif Carmake is "Subaru" > selected < / cfif > > Subaru < / OPTION >
< / select >
< table >
< /tr >
< b >
< td > < table >
< td >
< input type is 'submit' value is "Take Add to database" >
< table >
< /tr >
< / cfform >
< /table >
< / body >
< / html >
<!-then sends to the action of the CarAddAction.cfm page
< name cfquery = "InsertCarInfo."
DataSource = "#request. MainDSN #">"
INSERT INTO Car_tab)
car_Make
)
VALUES)
"#Trim (Form.car_make) #
)
< / cfquery > -.
The value you use for the name parameter in your SELECT becomes the name of the FORM variable that is sent to the action page, assuming a POST method. Goes same for tags of entry... the name you use becomes the name of the FORM variable.
Phil
-
Show and hide the drop-down menus on the page of the product, based on selected values
Hello.
I wish that my product page to view different drop-down lists following, based on the values of individual drop-down list.
I managed to achieve this through JavaScript, but I don't like how it works.As far as I know, there is no identifier for each individual drop-down list to determine who it is, so I can't for the moment is to rely on their order in the DOM, which is bad and it is difficult for me to create a solution that might work for all products.
For example, if the following is a single attribute:
< div class = "catProductAttributeGroup" style = "" display: none; "> < div class ="catProdAttributeTitle"> metal Foiling < / div > < div class ="catProdAttributeItem"> < select > < option value =" ">--please select--< / option > < option value ="6051720"> not necessary < / option > < option value ="6051721"> sheet ONE side + £45 < / option > < option value ="6051722"> Foiling BOTH sides + £75 < / option > < / select > < / div > < / div >"
I would like to than the div outermost having some sort of html attribute that contains the product id attribute. Something like: data-attribute id = "XXXXXXX". Is this possible?
Here's what I have so far:
I use {tag_attributes_json}, {tag_product_json} and {tag_currency} to get these values in javascript on the page loading, so I can use them later.
Then, I hang on to change the events of the drodpowns I have and then toggle their visibility based on those who are selected. I rely on the jequery ': eq (n)' selector to achieve, I don't like. Is there an option with {tag_attributes} which to add additional information (such as the ID attribute on the menu drop-down) on the generated HTML code?All works in the beginning, but if I can 'Add to Cart', the product element get ajax-reloaded and events are suddenly off the hook, so it no longer works. For this one, there are two options:
1. I could hang on to an event that triggers once the product added to the shopping cart and the page is ready. Is there such an event?
2. I could set up my own add to cart using bcInternals.shop.addToCart. I tried to do this, but I have two problems with it.
a. addToCart seems add my selection twice, for some reason any. Any ideas what I could do wrong?
b. the news of cart in the upper right corner don't refresh. Apparently, he's trying to refresh, but there is a kind of access error in the script. This part is not yet fully added to the page, but there is a function which would add it to the basket at the bottom of the largest block of script. Am I using the function addToCart incorrectly?
It's the page, sure I have the feature added partial implementation:
The scripts are currently embedded in the HTML code. Once I put it in place correctly, I would like to extract in a separate file. Search for "'$productAttributesElement ' to find the block with the features and for 'productInfo' to find the part where I store the product with tags. _json data "
Hello
No worries, na not know if you have solved or that the answer was not helpful
You need trigger the script you in the presentation of product details model, or you can add a listener for the container of the product and to trigger the script if changes are detected.
Concerning
-
Binded based on drop-down list values in a table of fluid
Can anyone help me please with my form of practice? I'm just started learning make a fillable pdf form. I did my practical form modeled after the purchase order example provided with the installation of livecyle. I want my table to automatically display the unit price when I select an item in the drop-down list. I managed to do it using the script below. The problem comes when I add my guard selection by returning to the first item on the drop-down list or on my first selection on the first row of lines. I would like to add something, the script below. Help, please.
RefreshmentOrderform.RefreshmentOrder.details.detail [0]. item::change - (JavaScript, client)
unitprice.rawValue = this.boundItem (xfa.event.newText);
unitprice.value = xfa.event.newText;
Hello
The problem you are having is because the ID of the drop-down list values are duplicated, if I choose cherry slice that get a 3 id (which is supposed to mean $3.00), but it is also the id of the Ambassador (as well as Brownies and coffee). If similar problem with chocolate tarts going assorted Mini Cookies.
If you keep the unique id. At first, I thought that you must assign the id 1,2,3,4... and a search in the table for the price, but I liked your idea to keep it all in the drop-down menu control, so if you changed do so their unique, something like 1: 3. 00, 2:1. 50, 3:3. 00,... you could strip the part before the colon by changing your code change event;
unitprice.rawValue = this.boundItem (xfa.event.newText).split(":") [1];
That transforms the id in a table and takes the second element.
In addition, there are a few errors in your form. In Acrobat (or reader) you should turn on 'See the console on errors and messages', which is located under preferences... JavaScript.
The second line in your change event causes a runtime error as the value property of a numeric field is its default value and to reference properly, you need to use.
unitprice.value.oneOfChild.value
But you do not have this line at all in this case.
There is also a problem with the initialization script in numServiceChargerate, that looks like a problem of displacement of FormCalc in some parts of the JavaScript form in others, I would try and stick with one or the other.
Good luck
Bruce
Maybe you are looking for
-
same email is sent continuously all by appearing not not in the sent box
using my iPhone 6, same email is sent continuously all by appearing not not in the sent box. for two days
-
Adobe Reader and Adobe Flash Player for Firefox
These two above ins card are offered by Firefox. However, I made several attempts to download and install these plug-ins, without success. Each time, the browser goes on the Adobe site. It says to access the instructions so installation of these plug
-
streaming
-
My MOV files to freeze during the download of my Canon T2i DSLR on my laptop HP - Vista
I recently bought a digital camera Canon T2i with HD video. I can download the pictures on my laptop HP with Windows Vista very well, however, when I try to upload the MOV files - it freezes in the middle and freezes also the functions of the comput
-
Image library for blackBerry Smartphones
Hello world I went to go and look at my pictures in the pictures library, and all I can see is photo for all my photos and not the actual images icons. It shows me that I have more than 100 pictures, but I can't view. How can I solve this? Also if