Add the number of rows
Hello
I am trying to get the character kerning to our document's report. I made the script without the number of lines, can you please guide me "how to add the number of lines with this script.
~ Set variables
myDoc var = app.activeDocument;
var myDocPath = myDoc.filePath;
var myDocName = myDoc.name;
FND = new Array();
FoundContents = new Array();
totalArray = new Array();
Try
{
var myColor = app.activeDocument.colors.item("KER").name;
}
catch (MyError)
{
myColor var = app.activeDocument.colors.add ();
myColor.name = "URL";
myColor. model = ColorModel.process;
myColor.colorValue = [15, 100, 100, 0];
}
~ End set variables
Table start to search for URLS and apply color
var doc = app.activeDocument,
_stories = doc.stories;
for (var i = 0; i < _stories.length; i ++)
{
var character = _stories [i] .characters;
for (var j = 0; j < characters.length; j ++)
{
If (characters [j] .insertionPoints [-1] .kerningMethod! = "Metrics" & & .kerningMethod of characters [j] .insertionPoints [-1]! = "Optical")
{
If (characters [j] .insertionPoints [-1] .kerningValue < = - 51)
{
the characters [j + 1] .fillColor = myColor;
characters [j] .fillColor = myColor;
}
}
}
}
reportPage = new Array();
reportContents = new Array();
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.fillColor = myColor;
var myFoundColor = app.activeDocument.findText ();
for (f = 0; f < myFoundColor.length; f ++)
{
var myFoundPage = myFoundColor [f] .parentTextFrames [0].parentPage.name;
FND.push (myFoundPage)
var myFoundContents is myFoundColor [f] .silence;.
FoundContents.push (myFoundPage + "\t" + myFoundContents + "\r")
}
Try this,
//~ Define variables var myDoc = app.activeDocument; var myDocPath = myDoc.filePath; var myDocName = myDoc.name; var result = []; try { var myColor = app.activeDocument.colors.item("KER").name; } catch(myError) { var myColor = app.activeDocument.colors.add(); myColor.name = "URL"; myColor. model = ColorModel.process; myColor.colorValue = [15, 100, 100, 0]; } //~ End define variables //Array start for find urls and apply color var doc = app.activeDocument, _stories = doc.stories; for(var i=0;i<_stories.length;i++) { var characters = _stories[i].characters; for(var j=0;jKind regards
Cognet
Tags: InDesign
Similar Questions
Add the number of rows in the table on the Page Framework OA
Hi all
I need to add a line at the bottom of a table in the OA framework to display the number of lines for the underlying table VO. Can someone point me in the right direction to get there?
Thanks in advance!
KristopherHi Kristopher,
As directed by your post, my understanding is that you want to have a line at the bottom of the table that contains a field that displays the number of rows found in the t... RT?
You can implement the same in the following way,
You can add a footer to your table and add a messageStyledText point in it. At this point, you can assign the value of VO.getFetchedRowCount ().Hope this is what you are looking for.
Kind regards
REDA Papdejaget the number of rows affected by their table top
Hello, I need to count the number of rows updated in table form. In the process of ApplyMRU, I can use the string substitution #MRU_COUNT # to show the lines updated in a success message, but I need to get this value and store it on a table. Any help would be much appreciated. Thank you.
oscarjavier99 wrote:
Hello, I need to count the number of rows updated in table form. In the process of ApplyMRU, I can use the string substitution #MRU_COUNT # to show the lines updated in a success message, but I need to get this value and store it on a table. Any help would be much appreciated. Thank you.
For that you would benefit from the APEX$ ROW_STATUS integrated substitution string.
1. create a page element display only (in my case P15_UPDATED_ROWS) Save Session State set to Yes and the Type of Condition is set to never.
2. Add a calculation after the shows with a Type of static assignment and calculation value 0 to reset the counter whenever the page is sent.
3. Add an On submit - after calculations and Validations process of PL/SQL page linked to your tabular presentation with a Status of Type PL/SQL Expression and Expression 1
:apex$row_status = 'U'
and the code of the following process ::p15_updated_rows := :p15_updated_rows + 1;If you don't actually means "day" in the strict sense, and then change the status of process to include possible APEX$ ROW_STATUS 'C', 'U', and "D" values as needed. If you want to count all created, updated and deleted lines, do not add the condition to the process, but make sure the extended run is set to createand changed lines.
How to add the number of records at the foot of the page in the file
Hello
I need to get the number of footer lines in the file.
I need to format footer below
County: 14.
How can I achieve this?
Thanks for your ideas.
Sébastien.
Another option which is independent of the operating system would be to
(1) put in place a refreshing variable that returns the number of rows
(2) use the OdiOutFile tool to add the result at the end of the file required by passing the variable as the value in the TEXT of the tool parameter
How can I get the number of rows in the table using Sunopsis API target in ODI 10 g?
Hi guys,.
In fact, I want to send an alert message as soon as the interface is run from a package. I've included alert OdiSendMail that sends an email once the interface is running.
Could someone please tell how to get the number of rows inserted into the table the Sunopsis API target.
I tried to use < % = odiRef.getNbRows () % >, but this has not worked for me. Since I am a beginner, could you please help out me
This is my mail to send ODI format
"The population of data managed to < % = odiRef.getSysDate () % >
Total of lines in the target table is: < - need an API code-> "
Kind regards
Clinton
Published by: LawrenceClinton on February 25, 2013 20:53Hello
Create the project with details below variable
Nom_de_variable: Total_Row_Count
Type of variable: Variable discount
Definition tab:
Data type: digital
Action: No persistentRefresh the tab:
Schema: provide the schema of your repository to work and beSELECT log.nb_row
THE journal of snp_step_log, snp_scen_step step
WHERE log.nno = step.nno
AND step.scen_no = (SELECT scen_no FROM snp_scen_step WHERE step_name='<%=odiRef.getPrevStepLog ('STEP_NAME") % > ')
AND log.sess_no = '< % = odiRef.getSession ("SESS_NO") % >' code at low
AND step.step_name = ' < % = odiRef.getPrevStepLog ("STEP_NAME") % > 'Note: add this variable after the stage of interface in your package (after the interface anywhere you can place), you can add this variable before ODISendEmailNotification in your package
call this varciable * #Total_Row_Count * in the Notification of ODISendEmail
for example :
Data has been fulfilled successfully in < % = odiRef.getSysDate () % >
Total no of lines filled are: * #Total_Row_Count *it will work
cordially,
Phanikanthedited by: Phanikanth on February 28, 2013 01:13
edited by: Phanikanth on February 28, 2013 01:14
Displays the number of rows in the table displaying a named criteria query data
I created a test named for my View, called 'Criteria1' and Criteria1 to create a group of ADF with Table query. I want to display the number of rows in result when a search is performed. How can I do?
Thanks in advance,
TomAs mentioned, you can add outputText and you must give OutputText partialTriggers as query component your Id. Thus, when you give a search on the query component, it will refresh the outputText with the number of lines.
ID = "ot1" partialTriggers = "id of the component of motion here" / > ""Count the number of rows returned from each view in USER_VIEWS
For each USER_VIEWS view, I would return the name, creation date, last modified dateand the number of rows returned by this view.
Here's what I have so far:
Returns:col object_name format a20 select object_name, created, last_ddl_time from user_objects where object_type = 'VIEW'
How can I add a last column that counts the number of rows returned by this view?OBJECT_NAME CREATED LAST_DDL_TIME -------------------- --------- ------------- AISLE_AVG 11-FEB-12 11-FEB-12 COURSE_AVG 11-FEB-12 20-FEB-12 EXE_12_VIEW 11-FEB-12 21-FEB-12 L1_P2 17-FEB-12 17-FEB-12 L1_P3 17-FEB-12 17-FEB-12 L1_P4 17-FEB-12 17-FEB-12 L1_P5A 17-FEB-12 17-FEB-12 L1_P5B 17-FEB-12 17-FEB-12 LAB3_1A 12-FEB-12 20-FEB-12 LAB3_1B 12-FEB-12 20-FEB-12 LAB3_2A 12-FEB-12 20-FEB-12 LAB3_2B 12-FEB-12 20-FEB-12 LAB5_1 19-FEB-12 19-FEB-12 LAB5_2 19-FEB-12 19-FEB-12 LAB5_3 19-FEB-12 19-FEB-12 LAB5_4 19-FEB-12 19-FEB-12 LAB5_5 19-FEB-12 19-FEB-12 LAB5_TIMES 19-FEB-12 19-FEB-12 LAB6_1 19-FEB-12 19-FEB-12 LAB7_VIEW 20-FEB-12 20-FEB-12 PROGRAMS 11-FEB-12 21-FEB-12 STUDENT_GPA 11-FEB-12 21-FEB-12 22 rows selected
EDIT - here is a dump of my paintings, and here are my views.
Edit2 - this is possible by using the DECODE function, by chance?The function...
CREATE OR REPLACE FUNCTION view_row_count (view_name VARCHAR2) RETURN NUMBER AS retval NUMBER; BEGIN EXECUTE IMMEDIATE 'select count(*) from '||view_name INTO retval; RETURN retval; END view_row_count; /
And now the query...
select object_name, created, last_ddl_time, view_row_count(object_name) as view_row_count from user_objects where object_type = 'VIEW'
Determine the number of rows returned by a cursor
I have a problem when I need to use slightly different logic based on whether or not a cursor returns a single line or multiple lines. I know you can use % ROWCOUNT to determine the number of rows returned far+, but it's not really help me because I need to know this information before I start to do any treatment.
In other words. How can I know the number of rows returned by a cursor without actually iterate through the entire thing.
I'm looking for something like this:
Cursor ReqCursor(pi_cert_id IN Varchar2) Is SELECT course_id cid, grade g FROM requirements WHERE cert_id = pi_cert_id; c_ReqCursor ReqCursor%Rowtype; Open CertCursor(p_cert_num); Loop Fetch CertCursor INTO c_CertCursor; Exit When CertCursor%Notfound; If c_CertCursor%NumOfRows > 1 THEN Case A; Else Case B; End If End Loop Close CertCursor;
For your business add
SELECT course_id cid, grade g, count(*) over() Tot_Rows FROM requirements WHERE cert_id = pi_cert_id; --"Fetch 1st row and you will know if the cursor has more than 1 row"
HTH
SSI need to add the number of words in my TextEdit. Suggestions?
I need to add the number of words in my TextEdit. Suggestions?
This can be useful:
How to determine the number of rows in the database and save the result to a local variable?
Hello
I'm a newbie in the use of TestStand, databases and SQL, and now I've met difficulties. I use TestStand 2014 (32 bit).
I have a need to know the number of rows in a database and save that number in a local variable. I tried to practice using the database of the Types of step provided with TS. I tried to use the following in a SQL statement:
Locals.NumberOfRows = ("SELECT COUNT (*) FROM TEST_TABLE")
It returns an error: specified value is not the expected type. My goal is possible in this way, or I'm doing this completely wrong?
-RautSa
Thank you for your response, Norbert. I have a database of who wins new values at random, and sometimes I need the exact number of rows in this table.
I managed to achieve my goal by using the SQL statement: "SELECT COUNT (*) as Rowcount OF TEST_TABLE", followed by a data GET operation, which records that number of lines in a local variable.
-RautSa
Count the number of rows in a table (s)
Hi all
I have a TKT_PRIORITY_LK table that I want to count the number of rows returned by a priority level... say Low, Medium, High, critical. I want to be able to count how many of each created are they, instead returning ID instead, if making any sense... Can you please help with this.
Example; Select count (*) in TKT_PRIORITY_LK
PRIORITY group
Kind regards
Sandrine
Try this
Select a.PRIORITY, count (*) from TKT_PRIORITY_LK a, TKT_TICKET_MAIN b
where a.id = b.PRIORITY_ID
A.PRIORITY group
See the number of rows affected the performance of sqlplus to a sql file
Hello
It's just we have a sql file that contains a bunch of select/update/insert statements.
I have a unix script that calls sqlplus on this sql file. However, at the exit I don't get the number of rows affected.
Without adding any code in the input sql file, how can I change the code of sqlplus shell script to print the number of rows affected for each statement in the sql file?
${ORACLE_HOME}/bin/sqlplus -L >> ${LOG_FILE} 2>&1 << EOF ${ORAID}/${ORAPASS}@${ORAINS} whenever sqlerror exit sql.sqlcode; set echo on; set feedback off; set serveroutput on; @${SQL_FILE}; exit; EOF RC=$?The SQL_FILE of entry content is:
select 12 "col1" from dual; select 'abcd' "col2" from dual; select; select 13 'col3' from dual;The result of the race of sqlplus is (LOG_FILE):
SQL*Plus: Release 11.2.0.2.0 Production on Fri Jun 6 14:28:00 2014 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter user-name: Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> SQL> SQL> SQL> SQL> SQL> select 12 "col1" from dual; col1 ---------- 12 SQL> select 'abcd' "col2" from dual; col2 ---- abcd SQL> select; select * ERROR at line 1: ORA-00936: missing expression Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing optionsThank you
Srinivas - y.
- echo setting
- Set feedback off;
use
Set of feedback on
Get the number of rows in the oracle table
Hi all
I want to get the total number of rows in the sql to the appmodule table.
After you apply the criteria to view some on the view object. If he try with getallrowsinrange the number of rows found within the viewobject was but I want a total number of rows in the sql table.
How can I get that
I use jdev 11.1.1.5
Thanks in advanceI threw something together, quick and dirty, don't hesitate to optimize.
Assuming you want the County table, I put the code in a subclass of EntityDefImpl since it is representing a table in the middle tier.
public class EmpDefImpl extends EntityDefImpl { /** * This is the default constructor (do not remove). */ public EmpDefImpl( ) {} //~ Methods **************************************************************************** public long getTableRowCount( DBTransaction transaction ) { String query = getQuery( ); String countQuery = String.format( "SELECT COUNT(*) FROM (%s)", query ); long count = 0; ViewObject vo = transaction.createViewObjectFromQueryStmt( countQuery ); try { vo.executeQuery( ); Row row = vo.first( ); Number number = (Number)row.getAttribute( 0 ); count = number.longValue( ); } finally { vo.remove( ); } return count; } }
Depending on your card type, you may not get an oracle.jbo.domain.Number, but something else, so the cast may need correction.
Usage example:
public class EmpEditViewImpl extends ViewObjectImpl { public EmpEditViewImpl() { } protected void executeQueryForCollection( Object object, Object[] object2, int i ) { super.executeQueryForCollection( object, object2, i ); EmpDefImpl def = ( EmpDefImpl )getEntityDef( 0 ); long tableRowCount = def.getTableRowCount( getDBTransaction() ) ); // Do something with it } }
As you can see, the code is fairly generic. Also, you might be able to put this in a base extension ADF class.
Sascha
Published by: Sascha Herrmann on June 7, 2012 14:39
to check the number of rows affected by an update query in a procedure
Hello
I want to check the number of rows affected by the update script that I used in a procedure and I shoud be able to use this count towards the end of the procedure.
How can I do?
for example:
create or replace procedure p1 is
Start
Update table1 set x = 'a', where y = 'b ';.
end p1;
Published by: christele CS on May 1, 2012 22:06Hello
Try the below a...
create or replace procedure p1 is
Start
Update table1 set x = 'a', where y = 'b ';.
dbms_output.put_line (SQL % ROWCOUNT |) ("Lines updated ');
end p1;You will need to add the number of days to the end date of the users.
Hello
I have a code where we adding the number of days (30) to the current date and update IDM DB user end date.
Now, we have a requirement to add the number of days (30) to the existing fence of user instead of add to the current date.
* public String incrementDate (int daysToAdd)
{
Start date
log.info("NotifyLastDayOfService::incrementDate(): entrez»);
SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-DD 00:00:00");
Calendar c = Calendar.GetInstance ();
c.Add (Calendar.DATE, daysToAdd); number of days to add
String PROMOTIONDate = sdf.format (c.getTime ());
log.info("NotifyLastDayOfService::incrementDate(): sortie»);
return Nouvelle_date;
}*/
Have any body set up this scenario?
Please suggest.
Thank you
Kalpana.You can try this as well
where oimAttribute = "Users.End Date"
public String updateOIMAttributeForDateType (String oimAttribute, Date endDate, long take, String daysToAdd)
{
tcUserOperationsIntf userOperationsIntf = null;
HashMapmodifyMap = new HashMap () ;
HashMapsearchmap = new HashMap () ;
SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-DD hh: mm :"); ")
try {}
Calander cal = null;
cal.setTime (endDate);
Cal.Add (Calendar.DATE, Integer.parseInt (daysToAdd));
Date Edate = cal.getTime ();
modifyMap.put (oimAttribute, Edate);
searchmap.put ("Users.Key", String.valueOf (take));
userOperationsIntf = Platform.getService (tcUserOperationsIntf.class);
tcResultSet searchset = (searchmap) userOperationsIntf.findAllUsers;
userOperationsIntf.updateUser (searchset, modifyMap);
return a SUCCESS;
} catch (Exception e) {}
If (Logger.isErrorEnabled ()) logger.error (e.getMessage ());
error return;
} {Finally
try {}
If (userOperationsIntf! = null) userOperationsIntf.close ();
} catch (Exception e) {if (logger.isErrorEnabled ()) logger.error (e.getMessage ()) ;}}
}
Maybe you are looking for
-
Google search results and google homepage display as symbols
Any attempt to use 'google' in Firefox 15 or 16 on my laptop returns a page full of symbols. All other pages and sites I visit work very well. The kind of symbols I see... .a subset of... are pasted below
-
Satellite L500/01U: Need guide user manual
What is the best way to find assistance with a user guide or manual for my TOSHIBA SATELLITE L500/01U.
-
QOSMIO F20-132 TV on media center card and memory Player do not work
Hi, I have a lot of problems with my qosmio. first the media Center TV never works and I don't know why. and the memory card reader does not work too... I don't anderstand why... If someone hepls me thank you. Thank you [Edited by: admin on 10 June 0
-
CPU Athlon II Windows XP, card mother Asus V8V. Registry is overlaoded? After 8 years. It applications ar that I don't want to give up. For this purpose, I do not reformat the HD 320 MB.
-
I had a bad copy of XP, caught a virus, bought a new genuine copy of XP, now the installation program tells me that it cannot find my hard drive. any suggestions?