Table cell - change is updating another cell using SQL
Hi allTried to search the forums without success.
I'm looking for a similar solution to the solution of Dene on its APEX demo page
http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:160
(Javascript display Set point I)
I have a table with a menu drop-down list of members of the staff
When the user selects a staff member, I want an Onchange command
fills another cell tablle with managers
SQL to get the manager would be somehting like this
Select staff. Manager of staff where staff.userid = employees
I know that I need to create an onchange command and pass the value to the called function.
I just need help to create javascript code that gets the data and passes the return information
Hope it's a simple question for someone (not me lol!)
Frank
This example is more appropriate:
http://Apex.Oracle.com/pls/OTN/f?p=31517:239
It gives you everything you need to achieve the desired results.
Denes Kubicek
------------------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------------------
Tags: Database
Similar Questions
-
get location from pixel coordinates to table cell
I would like the opposite of what the MakePoint() function. Instead of providing an index of table of row/column cell, I would get the coordinates of the beginning of a table of mouse cell.
Is there a special function to do this?
Hello ElectroLund,
I think GetTableCellRangeRect is what you are looking for.
To get the mouse coordinates table cell using GetTableCellFromPoint.
Constantine.
-
Access to the content of the tables of a schema into another schema
Hello
I have my doubts... Suppose I have a user called DEMO and it has tables. now I have another user called DEMO1
my doubt is. How can I get the DEMO user tables in DEMO1. If updating the table DEMO1 which should reflect
DEMO user. Help me...Dear friend,
You can consult the tables of a schema in another schema using the following steps.
(1) you must grant privileges on table demo Demo1, here's the statement to do so.
Grant Select, update on the table table_name to Demo1
(2) Create in Demo1 for the table_name demo, the suite is about education to do.
SYNONYM to CREATE or REPLACE table_name for Demo.table_name;
(3) do the Update statement on the table table_name in Demo1. Updated these results reflected in demo when you post the update statement in Demo1.
Hope that gives you an idea.
Kind regards
Ravi Kumar Ankarapu. -
Question to load data using sql loader in staging table, and then in the main tables!
Hello
I'm trying to load data into our main database table using SQL LOADER. data will be provided in separate pipes csv files.
I have develop a shell script to load the data and it works fine except one thing.
Here are the details of a data to re-create the problem.
Staging of the structure of the table in which data will be filled using sql loader
create table stg_cmts_data (cmts_token varchar2 (30), CMTS_IP varchar2 (20));
create table stg_link_data (dhcp_token varchar2 (30), cmts_to_add varchar2 (200));
create table stg_dhcp_data (dhcp_token varchar2 (30), DHCP_IP varchar2 (20));
DATA in the csv file-
for stg_cmts_data-
cmts_map_03092015_1.csv
WNLB-CMTS-01-1. 10.15.0.1
WNLB-CMTS-02-2 | 10.15.16.1
WNLB-CMTS-03-3. 10.15.48.1
WNLB-CMTS-04-4. 10.15.80.1
WNLB-CMTS-05-5. 10.15.96.1
for stg_dhcp_data-
dhcp_map_03092015_1.csv
DHCP-1-1-1. 10.25.23.10, 25.26.14.01
DHCP-1-1-2. 56.25.111.25, 100.25.2.01
DHCP-1-1-3. 25.255.3.01, 89.20.147.258
DHCP-1-1-4. 10.25.26.36, 200.32.58.69
DHCP-1-1-5 | 80.25.47.369, 60.258.14.10
for stg_link_data
cmts_dhcp_link_map_0309151623_1.csv
DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2
DHCP-1-1-2. WNLB-CMTS-03-3,WNLB-CMTS-04-4,WNLB-CMTS-05-5
DHCP-1-1-3. WNLB-CMTS-01-1
DHCP-1-1-4. WNLB-CMTS-05-8,WNLB-CMTS-05-6,WNLB-CMTS-05-0,WNLB-CMTS-03-3
DHCP-1-1-5 | WNLB-CMTS-02-2,WNLB-CMTS-04-4,WNLB-CMTS-05-7
WNLB-DHCP-1-13 | WNLB-CMTS-02-2
Now, after loading these data in the staging of table I have to fill the main database table
create table subntwk (subntwk_nm varchar2 (20), subntwk_ip varchar2 (30));
create table link (link_nm varchar2 (50));
SQL scripts that I created to load data is like.
coil load_cmts.log
Set serveroutput on
DECLARE
CURSOR c_stg_cmts IS SELECT *.
OF stg_cmts_data;
TYPE t_stg_cmts IS TABLE OF stg_cmts_data % ROWTYPE INDEX BY pls_integer;
l_stg_cmts t_stg_cmts;
l_cmts_cnt NUMBER;
l_cnt NUMBER;
NUMBER of l_cnt_1;
BEGIN
OPEN c_stg_cmts.
Get the c_stg_cmts COLLECT in BULK IN l_stg_cmts;
BECAUSE me IN l_stg_cmts. FIRST... l_stg_cmts. LAST
LOOP
SELECT COUNT (1)
IN l_cmts_cnt
OF subntwk
WHERE subntwk_nm = l_stg_cmts (i) .cmts_token;
IF l_cmts_cnt < 1 THEN
INSERT
IN SUBNTWK
(
subntwk_nm
)
VALUES
(
l_stg_cmts (i) .cmts_token
);
DBMS_OUTPUT. Put_line ("token has been added: ' |") l_stg_cmts (i) .cmts_token);
ON THE OTHER
DBMS_OUTPUT. Put_line ("token is already present'");
END IF;
WHEN l_stg_cmts EXIT. COUNT = 0;
END LOOP;
commit;
EXCEPTION
WHILE OTHERS THEN
Dbms_output.put_line ('ERROR' |) SQLERRM);
END;
/
output
for dhcp
coil load_dhcp.log
Set serveroutput on
DECLARE
CURSOR c_stg_dhcp IS SELECT *.
OF stg_dhcp_data;
TYPE t_stg_dhcp IS TABLE OF stg_dhcp_data % ROWTYPE INDEX BY pls_integer;
l_stg_dhcp t_stg_dhcp;
l_dhcp_cnt NUMBER;
l_cnt NUMBER;
NUMBER of l_cnt_1;
BEGIN
OPEN c_stg_dhcp.
Get the c_stg_dhcp COLLECT in BULK IN l_stg_dhcp;
BECAUSE me IN l_stg_dhcp. FIRST... l_stg_dhcp. LAST
LOOP
SELECT COUNT (1)
IN l_dhcp_cnt
OF subntwk
WHERE subntwk_nm = l_stg_dhcp (i) .dhcp_token;
IF l_dhcp_cnt < 1 THEN
INSERT
IN SUBNTWK
(
subntwk_nm
)
VALUES
(
l_stg_dhcp (i) .dhcp_token
);
DBMS_OUTPUT. Put_line ("token has been added: ' |") l_stg_dhcp (i) .dhcp_token);
ON THE OTHER
DBMS_OUTPUT. Put_line ("token is already present'");
END IF;
WHEN l_stg_dhcp EXIT. COUNT = 0;
END LOOP;
commit;
EXCEPTION
WHILE OTHERS THEN
Dbms_output.put_line ('ERROR' |) SQLERRM);
END;
/
output
for link -.
coil load_link.log
Set serveroutput on
DECLARE
l_cmts_1 VARCHAR2 (4000 CHAR);
l_cmts_add VARCHAR2 (200 CHAR);
l_dhcp_cnt NUMBER;
l_cmts_cnt NUMBER;
l_link_cnt NUMBER;
l_add_link_nm VARCHAR2 (200 CHAR);
BEGIN
FOR (IN) r
SELECT dhcp_token, cmts_to_add | ',' cmts_add
OF stg_link_data
)
LOOP
l_cmts_1: = r.cmts_add;
l_cmts_add: = TRIM (SUBSTR (l_cmts_1, 1, INSTR (l_cmts_1, ',') - 1));
SELECT COUNT (1)
IN l_dhcp_cnt
OF subntwk
WHERE subntwk_nm = r.dhcp_token;
IF l_dhcp_cnt = 0 THEN
DBMS_OUTPUT. Put_line ("device not found: ' |") r.dhcp_token);
ON THE OTHER
While l_cmts_add IS NOT NULL
LOOP
l_add_link_nm: = r.dhcp_token |' _TO_' | l_cmts_add;
SELECT COUNT (1)
IN l_cmts_cnt
OF subntwk
WHERE subntwk_nm = TRIM (l_cmts_add);
SELECT COUNT (1)
IN l_link_cnt
LINK
WHERE link_nm = l_add_link_nm;
IF l_cmts_cnt > 0 AND l_link_cnt = 0 THEN
INSERT INTO link (link_nm)
VALUES (l_add_link_nm);
DBMS_OUTPUT. Put_line (l_add_link_nm |) » '||' Has been added. ") ;
ELSIF l_link_cnt > 0 THEN
DBMS_OUTPUT. Put_line (' link is already present: ' | l_add_link_nm);
ELSIF l_cmts_cnt = 0 then
DBMS_OUTPUT. Put_line (' no. CMTS FOUND for device to create the link: ' | l_cmts_add);
END IF;
l_cmts_1: = TRIM (SUBSTR (l_cmts_1, INSTR (l_cmts_1, ',') + 1));
l_cmts_add: = TRIM (SUBSTR (l_cmts_1, 1, INSTR (l_cmts_1, ',') - 1));
END LOOP;
END IF;
END LOOP;
COMMIT;
EXCEPTION
WHILE OTHERS THEN
Dbms_output.put_line ('ERROR' |) SQLERRM);
END;
/
output
control files -
DOWNLOAD THE DATA
INFILE 'cmts_data.csv '.
ADD
IN THE STG_CMTS_DATA TABLE
When (cmts_token! = ") AND (cmts_token! = 'NULL') AND (cmts_token! = 'null')
and (cmts_ip! = ") AND (cmts_ip! = 'NULL') AND (cmts_ip! = 'null')
FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "
TRAILING NULLCOLS
('RTRIM (LTRIM (:cmts_token))' cmts_token,
cmts_ip ' RTRIM (LTRIM(:cmts_ip)) ")". "
for dhcp.
DOWNLOAD THE DATA
INFILE 'dhcp_data.csv '.
ADD
IN THE STG_DHCP_DATA TABLE
When (dhcp_token! = ") AND (dhcp_token! = 'NULL') AND (dhcp_token! = 'null')
and (dhcp_ip! = ") AND (dhcp_ip! = 'NULL') AND (dhcp_ip! = 'null')
FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "
TRAILING NULLCOLS
('RTRIM (LTRIM (:dhcp_token))' dhcp_token,
dhcp_ip ' RTRIM (LTRIM(:dhcp_ip)) ")". "
for link -.
DOWNLOAD THE DATA
INFILE 'link_data.csv '.
ADD
IN THE STG_LINK_DATA TABLE
When (dhcp_token! = ") AND (dhcp_token! = 'NULL') AND (dhcp_token! = 'null')
and (cmts_to_add! = ") AND (cmts_to_add! = 'NULL') AND (cmts_to_add! = 'null')
FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "
TRAILING NULLCOLS
('RTRIM (LTRIM (:dhcp_token))' dhcp_token,
cmts_to_add TANK (4000) RTRIM (LTRIM(:cmts_to_add)) ")" ""
SHELL SCRIPT-
If [!-d / log]
then
Mkdir log
FI
If [!-d / finished]
then
mkdir makes
FI
If [!-d / bad]
then
bad mkdir
FI
nohup time sqlldr username/password@SID CONTROL = load_cmts_data.ctl LOG = log/ldr_cmts_data.log = log/ldr_cmts_data.bad DISCARD log/ldr_cmts_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &
nohup time username/password@SID @load_cmts.sql
nohup time sqlldr username/password@SID CONTROL = load_dhcp_data.ctl LOG = log/ldr_dhcp_data.log = log/ldr_dhcp_data.bad DISCARD log/ldr_dhcp_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &
time nohup sqlplus username/password@SID @load_dhcp.sql
nohup time sqlldr username/password@SID CONTROL = load_link_data.ctl LOG = log/ldr_link_data.log = log/ldr_link_data.bad DISCARD log/ldr_link_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &
time nohup sqlplus username/password@SID @load_link.sql
MV *.log. / log
If the problem I encounter is here for loading data in the link table that I check if DHCP is present in the subntwk table, then continue to another mistake of the newspaper. If CMTS then left create link to another error in the newspaper.
Now that we can here multiple CMTS are associated with unique DHCP.
So here in the table links to create the link, but for the last iteration of the loop, where I get separated by commas separate CMTS table stg_link_data it gives me log as not found CMTS.
for example
DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2
Here, I guess to link the dhcp-1-1-1 with balancing-CMTS-01-1 and wnlb-CMTS-02-2
Theses all the data present in the subntwk table, but still it gives me journal wnlb-CMTS-02-2 could not be FOUND, but we have already loaded into the subntwk table.
same thing is happening with all the CMTS table stg_link_data who are in the last (I think here you got what I'm trying to explain).
But when I run the SQL scripts in the SQL Developer separately then it inserts all valid links in the table of links.
Here, she should create 9 lines in the table of links, whereas now he creates only 5 rows.
I use COMMIT in my script also but it only does not help me.
Run these scripts in your machine let me know if you also get the same behavior I get.
and please give me a solution I tried many thing from yesterday, but it's always the same.
It is the table of link log
link is already present: dhcp-1-1-1_TO_wnlb-cmts-01-1 NOT FOUND CMTS for device to create the link: wnlb-CMTS-02-2
link is already present: dhcp-1-1-2_TO_wnlb-cmts-03-3 link is already present: dhcp-1-1-2_TO_wnlb-cmts-04-4 NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-5
NOT FOUND CMTS for device to create the link: wnlb-CMTS-01-1
NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-8 NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-6 NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-0 NOT FOUND CMTS for device to create the link: wnlb-CMTS-03-3
link is already present: dhcp-1-1-5_TO_wnlb-cmts-02-2 link is already present: dhcp-1-1-5_TO_wnlb-cmts-04-4 NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-7
Device not found: wnlb-dhcp-1-13 IF NEED MORE INFORMATION PLEASE LET ME KNOW
Thank you
I felt later in the night that during the loading in the staging table using UNIX machine he created the new line for each line. That is why the last CMTS is not found, for this I use the UNIX 2 BACK conversion and it starts to work perfectly.
It was the dos2unix error!
Thank you all for your interest and I may learn new things, as I have almost 10 months of experience in (PLSQL, SQL)
-
Change the background color of a table cell, depending on the selection in a drop-down list
I have a drop-down list wrapped in a subform in a table cell. Users can choose green, yellow or red, and I want the background color to change according to their choice.
Can you tell me why this script does not work? I'm sure that some of you, dear friends can see in a second.
If (this. ListItem == "green") {}
Subform1.DropDownList1.fillColor = "000,128,000"; BackgroundFill = "solid";
}
If (this. ListItem == 'yellow') {}
Subform1.DropDownList1.fillColor = "255,128,000";
}
If (this. ListItem == 'red') {}
Subform1.DropDownList1.fillColor = "255,000,000;
}
Thank you
Hello
I think you should be able to use the following code in the event change of the dropdownlist control.
Form1. #subform [0]. Table1.row2.DropDownList1::change - (JavaScript, client)
If {(xfa.event.change=="green)"}
this.fillColor = "000,128,000";
}
If {(xfa.event.change=="yellow)"}
this.fillColor = "255,128,000";
}
If {(xfa.event.change=="red)"}
this.fillColor = "255,000,000;
}
Concerning
Bruce
-
change the pop-up list for all cells using this pop-up window
I have a workbook of numbers more who uses the same large table pop up in almost every row in each sheet...
How can I maintain the list of items on the global scale (in all occurrences)?
Creating on the Mac to use it on all my devices.
Thank you!
Let's say you already have a selection of cells that are formatted as a menu pop up. Here is an example. C2, D2 and E2 are all the pop ups.
If you want to add a new item to all the pop-ups AND want to keep the current selections, perhaps you want to add 'In PROGRESS' for the existing pop ups, maintain the current selection and convert the cell with the new element to a set menu.
Simply select the cells with the existing pop-up and the cell with the new item.
In this case, I selected the cells C2 to E2, then I held the command key and click cell E3
Now, to make all these popups of cells using cell formatter:
-
How to disable the change (the value read-only) on an editable Table cell?
Hi friends
How to disable the change on an editable on certain conditions Table cell?
are there example links?
concerning
Published by: sak on December 22, 2009 11:28No, in the apex_item attributes for example
select APEX_ITEM.CHECKBOX(1,empid,nvl(empid,'readonly')) test from emp
Shunt
-
Automatically size using CSS table cell width
How can I get my CSS file to automatically size the width of the table cells where the text?
Example pageKeep your white width
table {}
Width:;
}
Or in your properties of table W = "keep Virgin."
See you soon
Sam"rmiman"
wrote in message news:
ev0h1o$A4J$1@forums. Macromedia.com...
> How can I get my CSS file to automatically size the width of the table
> cells where the text?
>
> http://www.rminc.com/test_examples/test3.html -
Hello
Could someone please help me understand how to access the cells in a table (to do)? I have a report with a table full of a channel. In a column, it shows a list of names (which come from a channel). I have another string with a list of colors and I want to associate each name in the table with a color of the second round. I tried unsuccessfully to access even a cell using D2TabRow and D2TabCol and the content...
Any help is appreciated
Thank you
Hi Muskeg,
Edna has sent two times it shows the only way to change the font of the text in individual table cells properties. You create, save and call a UserCommand, so is not simple. The main problem you use is that the table in the REPORT object does not generally contain cells. If you happen to have chosen a column type in the 'list of text', then you can access the contents of individual table cells, but otherwise, your only options are to get and set the values outside the table that the table is referencing - be they channel values or the values of variables or expressions.
The easiest option is to get/set of string values and assign each column of the table or row to display the channel values.
Brad Turpin
Tiara Product Support Engineer
National Instruments
-
How can I write in a table cell (row, column appear) in a databae?
How can I write in a table cell (row, column appear) in a database using LabVIEW Database Toolkit? I use Ms Access. Suppose I have three columns in a table, I write 1 row of the 1st column, then 1st rank of the 3rd column. The problem I have is after writing the 1st column of 1st row, the reference goes to the second row, and if I write in the 3rd column, he goes to the 2nd row 3rd column. Any suggestion?
When you perform a SQL INSERT command, you create a new line. If you want to change an existing line, you must use the UPDATE command (i.e. UPDATE tablename SET column = value WHERE some_column = some_value). The some_column could be the unique ID of each line, date and time, etc.
I don't know what is the function to use in the Toolbox to execute a SQL command, since I do not use the Toolbox. Also, I don't understand why you don't do a single INSERT. It would be much faster.
-
The table cell background image problem-
I'm sure it's something super simple, but I can't see what it is. I'm working in Dreamweaver CS3, but having to modify the code by hand, because the code is not validated I fight to clean up the last error on this page before applying the model it is based on the rest of my site...
This page was based on the original model: http://jpcltdservices.com/template-page.html
As you can see by the w3C validator, it had a number of problems with the tags for the table background image:
http://validator.w3.org/check?URI=http%3A%2f%2Fjpcltdservices.com%2Ftemplate-page.html & cha rset = (detect + automatically) & doctype = Inline & group = 0 & verbose = 1 & st = 1 & user-agent = W3C_Validator %2F1.606
I cleaned up by adding the table background image css to my stylesheet main and changed the code in the page for suggested type reference.
http://jpcltdservices.com/Alternate_template_page.html
W3C validator shows now only 1 error:
http://validator.w3.org/check?URI=http%3A%2f%2Fjpcltdservices.com%2FAlternate_template_pag.html & charset = (detect + automatically) & doctype = Inline & group = 0 & verbose = 1 & st = 1 & = _Validator%2F1.606 W3C user agent
The problem is, if I replace the background = "Images/CellBG1sm.jpg td' on line 34 with style ="background-image"td tag that works on line 27, the background image disappears completely from the whole table!"
I'm sure it's something super simple, but I can't see it. I'm working in Dreamweaver CS3, but having to modify the code by hand, because the code it generates does not validate in many cases.
TequilaMockingbird published in macromedia.dreamweaver
> I cleaned up by adding the css to the bottom of table
> image to my main
> sheet style and changed the code in the page to the suggested
> reference style.
>
> http://jpcltdservices.com/Alternate_template_page.html
>
> W3C validator shows now only 1 error:
>
>
> http://validator.w3.org/check?uri=http%3A%2F%2Fjpcltdservices.com%2
> FAlternate_te
> mplate_page.html & charset = (detect + automatically) & doctype = Inline & group
> p = 0 & verbose = 1 &st=1&user-agent=W3C_Validator%2F1.606
>
> The problem is, if I replace the td
> background = "Images/CellBG1sm.jpg" on "
> line 34 with style = "background-image" td tag that works on
> line 27, the background image disappears completely from all
> table!You seem to be sensational. The CSS validator is another object of value
tool: http://jigsaw.w3.org . I suspect this first error to main.css is
the incorrect syntax used here:background-image: {"url... / Images/CellBG1sm.jpg";}
' background-repeat: repeat;
}Go ahead and remove this rule completely.
For an inline style, try this:
But it might be better to remove all those inline styles and use your
external main.CSS. For example, you are not currently using. MainContent,
so maybe it's a good place:. MainContent {}
do-family: Arial, Helvetica, without-serif, Tahoma;
color: #3F3F61;
do-size: 100%;
background-image: URL("Images/CellBG1sm.jpg");
margin: 0 auto;
padding: 0;
Width: 790px;
}Then, in the table cell or appropriate:
or
Not quite $ $0,02, but HTH
--
Mark A. Boyd
Keep-on-Learnine :) -
Get a weird selection indicator displacement effect in the cells when using tables in LV 2013 (32) on Win 7 (64). Hesitate to call it a "scroll" because that which has other meanings in the context of the table.
Click on the letters in the attached VI to see - same effects if the table is in a VI running or not.
+ clicking on 'A' has no effect. You remove 'A', the cell to move.
+ clicking on one of the cells located below "A" act as above
+ clicking on the header cell 'x' causes a big drift. Put the other values in the cell has other effects (some travel a lot, some not at all)
+ clicking on the cell of the table "y" causes a big bend on the side. Put the other values in the cell has other effects (some travel a lot, some not at all)
+ clicking on the "z" table cell is not moving. You delete 'z', a big bend on the side
+ I noticed the change which occurs when you remove "A" stops at the same place in the landscape as if you
Comments:
+ Seems to be related to the cells to justify = center.
+ Shifting is always is from right to left.
+ I noticed the change which occurs when you remove "A" stops at the same horizontal location as if you click on 'y '.
+ occurs at least two different machines from different mfg both 2013-32 running on Win7-64.
In the case where you are still interested, see 5 message in this thread.
-
With the help of several styles of paragraph in a table cell
Hello
I'm stuck using several styles of paragraph within a cell. I guess the solution is that I need to start a new paragraph, but so far I have not found a way to do it. When I directly in InDesign, it works fine, but I can not start a new paragraph when you use the script.
Here's a solution I've tried:
with {(table)
.properties de.insertionPoints.item-(1) lines [0] .cells [0] = {}
content: '1 ' Format string,
appliedParagraphStyle: styleFormat1
};
.properties de.insertionPoints.item-(1) lines [0] .cells [0] = {}
content: "\rString in size 2',
appliedParagraphStyle: styleFormat2
};
}
But until now I did not get a new paragraph. When you look at the IDMLs, you can see that InDesign adds a new paragraph inside the cell, while my code remains in the same paragraph.
Here the IDML result when I do in InDesign:
"< cell auto ="ue0ie4i0"Name =" "0:0" RowSpan = "1" ColumnSpan = "1" AppliedCellStyle = "CellStyle / $ID / [no]" AppliedCellStylePriority = "0" >
< ParagraphStyleRange AppliedParagraphStyle = "ParagraphStyle/Format1" >
< CharacterStyleRange AppliedCharacterStyle = "CharacterStyle / $ID / [no style character]" >
< content > string to Format 1 < / content >
< Br / >
< / CharacterStyleRange >
< / ParagraphStyleRange >
< ParagraphStyleRange AppliedParagraphStyle = "ParagraphStyle/Format2" >
< CharacterStyleRange AppliedCharacterStyle = "CharacterStyle / $ID / [no style character]" >
< content > string to Format 2 < / content >
< / CharacterStyleRange >
< / ParagraphStyleRange >
< / cell >
And here is that when I use the script:
"< cell auto ="ue0ie4i0"Name =" "0:0" RowSpan = "1" ColumnSpan = "1" AppliedCellStyle = "CellStyle / $ID / [no]" AppliedCellStylePriority = "0" >
< ParagraphStyleRange AppliedParagraphStyle = "ParagraphStyle/Format2" >
< CharacterStyleRange AppliedCharacterStyle = "CharacterStyle / $ID / [no style character]" >
< content > string to Format 1 < / content >
< Br / >
< content > string to Format 2 < / content >
< / CharacterStyleRange >
< / ParagraphStyleRange >
< / cell >
It is therefore quite clear my script is not adding a new paragraph. Any ideas how to get a new paragraph so I can use more than one paragraph style?
I don't have test nore debug your code, but I suggest you another method to apply the content and style of two paragraphs. Do not use a with statement.
What is your version of InDesign?
Example:
// Add new document: var doc = app.documents.add(); // Add two paragraph styles: var paraStyle1 = doc.paragraphStyles.add({name : "ParaStyle-1" , pointSize : 20}); var paraStyle2 = doc.paragraphStyles.add({name : "ParaStyle-2" , pointSize : 15}); // Add a new text frame (default is on page 1): var newTextFrame = doc.textFrames.add(); newTextFrame.geometricBounds = [0,0,"150mm","150mm"]; // Add a table to this text frame: var table = newTextFrame.tables.add ( { bodyRowCount : 4 , columnCount : 3 , width : "150mm" } ); // Assign the contents as array: // The fisrt and only entry in this array will give the first cell its contents: table.contents = [ "Paragraph 1"+"\r"+"Paragraph 2" ] // Assign the formatting of the two paragraphs: table.cells[0].paragraphs[0].appliedParagraphStyle = paraStyle1; table.cells[0].paragraphs[1].appliedParagraphStyle = paraStyle2;
Strategic outcome with InDesign CS6 Mac OS x 10.6.8 v8.1.0:
Hope, that helps.
Uwe -
Hi all
I use FrameMaker 10 and am new to him.
Figured out how to center the text in a cell using the paragraph Designer, but it will not be saved.
There is an existing table that someone else put in place.
any help appreciated.
Thank you
Myko
-Myko,
- You don't have to use the Structure view to change attributes in FrameMaker. The command element > change attributes evokes the pod of attributes, initialized to display the attributes of the current element.
- You can set attributes for multiple elements with a single command. If you select multiple items, the attributes pod displays the attributes common to all of them. For example, if you select adjacent cells, you can define all attributes align both. Be aware, however, that if you select all the cells in a row, FrameMaker "warms up" the selection to the item line instead of individual cells. Therefore, if you want to set an attribute on all cells in the row, you will need to do this in two parts.
- You can copy and paste attribute values. For example, you can:
- Set the attribute align on a single cell.
- Make sure that no other attributes are set to this cell.
- Use ADSI > copy special > attribute values to copy as an attribute to the Clipboard.
- Select the other cells (but not whole rows) and paste.
- You can use find/replace to stick the attribute values. For example, once you have the desired value of the align attribute in the Clipboard, the pod of find/replace, you can:
- Select the item in the context menu search above and specify the name of the attribute you want to change.
- Click search to find the next occurrence of the attribute.
- In the context menu of change, select by collage.
- Click on edit or replace and search.
You can also use replace to change all the attributes of the type specified in a book, Document or selection.
- If there is an align attribute in FrameMaker, most likely there is an align attribute in XML. If you are the person who maintains the XML document, you can set the XML attribute instead of in FrameMaker. If you set attributes in FrameMaker and save the document in XML format, depending on how FrameMaker has been configured for your environment, it is likely that the attribute values are saved ub XML.
- If the align attribute is optional, there may be a default value (if if, when no value explicitly, the outline view will show the default value in italic) and the bottom of the basket of attributes will display by default.
- Some structured environments are set up so that the attributes such as align can be set for the entire table, the table (header, body, footer) part, the line or cell. Indeed, the value for one of these elements becomes the default value for his descendants.
- If the attribute has no default value, the FrameMaker table format determines the paragraph format to use and alignment in the paragraph format is used. If you are the person in your organization who maintains the model, you can set the table format to make the default choice most likely for your special documents.
-Lynne
-
V DW3: Make a model that fits in a table cell?
I have a long-standing website which has grown a lot over time. I have the "main Menu" on each page. whenever there is a change for her, I have to cut ' n paste it in all the pages and republish all pages.
I created a template of main menu which is supposed to fit into a table cell on each page. However, when I "Edit/models/Apply template", it fills the entire width of the screen (it looks like the page of the entire model, not just the table wide 220px). This, of course, not what I need.
I made the Menu in a library item and who does not work BUT this inserts them content of the library item every page I'm back to republish all the pages.
Is there a way I can use a model so that I can change the main Menu and only need to republish the page template?
You are welcome! Good luck.
Also, you might want to mark this question as answer while other similar issues can find more easily.
Maybe you are looking for
-
How to remove a name from uninstall?
Hello everyone. I have a problem with a program that I want to delete but I couldn't remove it the normal way by uninstall so I decided to remove it manually. I removed it, but the name of the program is still stuck in uninstall thingy I have no idea
-
I made a group for a community that I am, and I'm wishing I can lock the subject and the group photo, so that they cannot constantly which change all the time and lose focus on what the cat is actually for the value of things. I looked up and I tried
-
Hello My macbook pro, early 2011, has developed this question constantly want to restart itself, which began after an updated operating system a few back. Since the last update, it was not bad, but always makes me a big problem when it crashes. I can
-
PIX configuration with several requests from NAT
Hello I have PIX running version 7.1 (2). I use "nat 0" for all outgoing traffic to bypass NAT I have 5 different networks without going through the NAT. PIX device but I want to apply NAT just for a new network without affecting the rest of the traf
-
The latest version of reactive of Muse is a mountain too high to climb.I want to go back to what I know - MUSE 2014.But when I try to download the previous version, I'm hung upward and an error message:ERROR: DW028: InstallOperationsQueue: instructio