Need to format comma separated values in address line in Adobe Forms
Hi All,
I have one text in which fields are separated by comma. I want to display the text in a text field. But whenever there is a comma the text following it needs to be printed in the same text field on new line.
Is there any way to achieve this.
e.g. if the address line 01 = ABC, 01/123 XYZ, 890776
then the output should be printed as follows
ABC
01/123 XYZ
890776
Thanks...
Hi,
You need to put the code in the java script where you ll read the text in the texfield and then read it in diff var on the basis of the comma and then print the various var as an output.
Hope this might help you.
Thanks
Pooja
Similar Messages
-
How to display the comma separeated values in a row in the form of coulmns?
Hi,
I have a table as shown below.
Table name: Projs
Project_Id Associates_List
proj1 2,3,4,5
proj2 2,5,1
We are looking at moving this data into a normalized format as shown below.
Project_Id Associates_List
proj1 2
proj1 3
proj1 4
proj1 5
proj2 2
proj2 5
proj2 1
How can we achieve this?
If anybody knows, please provide the soultion.SQL> ed
Wrote file afiedt.buf
1 with t as (select 'proj1' as proj_id, '2,3,4,5' as asoc_list from dual union all
2 select 'proj2', '2,5,1' from dual)
3 -- END OF TEST DATA
4 select proj_id, asoc
5 from (
6 select proj_id
7 ,regexp_substr(asoc_list, '[^,]+', 1, rn) as asoc
8 from t
9 ,(select rownum rn
10 from dual
11 connect by rownum <= (select max(length(regexp_replace(asoc_list,'[^,]')))+1
12 from t
13 )
14 ) x
15 )
16 where asoc is not null
17* order by 1, 2
SQL> /
PROJ_ ASOC
proj1 2
proj1 3
proj1 4
proj1 5
proj2 1
proj2 2
proj2 5
7 rows selected.
SQL>Edited by: BluShadow on Oct 29, 2009 3:09 PM
reworded a.s.s. so that profanity checker doesn't complain. -
Custom Document for Comma Separated Values in a JTextField
Hi,
I tried to create a custom structured Document implementation for comma separated values (on one line) in a JTextField:
I want to have one LeafElement for each value (to store as an attribute the Object associated with this value). So, if I plug a DocumentListener to the JTextField, I can easily see which value(s) have been added/removed (see ElementChange).
I used the PlainDocument implementation as a starting point and replaced the logic related to the '\n' character by the ',' (see #insertUpdate).
Then I realized that the View must be customized too. So I created a View with a custom #paint method to draw each LeafElement on the same line.
But, now, I try to fix the ElementChange returned by the #insertUpdate and #removeUpdate methods.
Indeed, I played with a JTextArea with two lines "Bart\nisa" and plugged a debugging DocumentListener.
And the event I get when I type 'L' before "isa" is really strange:
- Two elements removed,
- Two elements added.
In the PlainDocument#insertUpdate, the code updates the 'offset' but I don't understand the logic behind.
Could you explain me why I got this result?
Could you give me an hint?
Best Regards,
El Barto.When you say the offset gets updated, I assume you're talking about this bit:
int offset = chng.getOffset();
int length = chng.getLength();
if (offset > 0) {
offset -= 1;
length += 1;
} The result is that, if a character is added at the very beginning or end of a line, the edit gets treated as a multi-line edit, which means the LeafElements on either side of the edit get removed and reconstructed. I discovered this behavior a few years ago, and I never have figured out what purpose it serves. I think you'll just have to try overriding the method to eliminate that behavior, and see what happens. -
File need to be read in different formats( Tab formatted, commas separated)
Hi All,
I am reading an input text file which can be in any of the format like tab formatted, commas separated or fixed format. How can i write a code to make it work for all these file format other than writing separately for the above three cases. Kindly suggest.
Thanks,
Neslin.As far as seperators are concerned you may read entire file to stirng table, then identify separator (i.e. if you find tab mark, you assume it is tab separated; if you find ";" mark you assume this is a column separator). Use SEARCH or FIND statement and then (after having the separator) loop at string table and split each entry at this separator. If none of the above was find (no separator or fixed one) split according to given fixed format.
-
The selected file does not appear to be a valid comma separated values (csv) file or a valid tab delimited file. Choose a different file.
I guess your question is, "what's wrong with the file?"
You're going to have to figure that out yourself, as we cannot see the file.
Importing into Address book requires either a tab-delimited or a comma-delimited file. You can export out of most spreadsheets into a csv file. However, you need to make sure you clean up the file first. If you have a field that has commas in the field, they will create new fields at the comma. So, some lines will have more fields than the others, causing issues like the error you saw. -
Comparing 2 comma separated value strings
Hi
I've the following requirement where i need to comapre 2 strings having comma separated values.
declare
v_Str1 varchar2(100) ;
v_str2 varchar2(100);
begin
v_str1 := '123,234,456' ;
v_str2 := '123,234';
/* *I need to write a logic to compare the above 2 strings
Could you please give me hint to achieve this* */Thanks
Edited by: smile on Mar 13, 2012 8:20 PMTry this
declare
v_Str1 varchar2(100) ;
v_str2 varchar2(100);
begin
v_str1 := '123,234,456,4364' ;
v_str2 := '123,234';
For cur_rec in (
select REGEXP_SUBSTR (v_str1, '[^,]+', 1, level) output
from t
connect by level <= regexp_count(v_str1,',')+1
MINUS
select REGEXP_SUBSTR (v_str2, '[^,]+', 1, level) output
from t
connect by level <= regexp_count(v_str2,',')+1) loop
DBMS_OUTPUT.PUT_LINE(cur_rec.output);
End loop;
End;
4364
456
PL/SQL procedure successfully completedAnother format
declare
v_Str1 varchar2(100) ;
v_str2 varchar2(100);
v_Str3 varchar2(100);
begin
v_Str1 := '600,100,500,200,300,400' ;
v_Str2 :='100,200';
For cur_rec in (
select REGEXP_SUBSTR (v_str1, '[^,]+', 1, level) output
from t
connect by level <= regexp_count(v_str1,',')+1
MINUS
select REGEXP_SUBSTR (v_str2, '[^,]+', 1, level) output
from t
connect by level <= regexp_count(v_str2,',')+1) loop
v_Str3:=v_Str3||','||cur_rec.output;
End loop;
v_Str3:=LTRIM(RTRIM(v_Str3,','),',');
DBMS_OUTPUT.PUT_LINE(v_Str3);
End;
300,400,500,600
PL/SQL procedure successfully completedEdited by: Lokanath Giri on १४ मार्च, २०१२ १:३३ अपराह्न -
Here is my dilemma. I am an archivist at an arts organization and we are in the process of digitizing many of our materials to post them on the web and make them available to internet users. One of the principle components of our collection is a large trove of photographs. We have been in the process of digitizing these images and embedding metadata (in the Caption/Description, Author/Photographer and Copyright fields) via PhotoShops File Info command.
Now I am at a crossroads. We need to extract this metadata and transfer it into a comma separated value form, like an Excel spreadsheet or a FileMakerPro database. I have been told that it is not possible to do this through PhotoShop, that I must run a script through Acrobat or Bridge. I have no clue how to do this. I have been directed to a couple of links.
First I was directed to this (now dead) link: http://www.barredrocksoftware.com/products.html
The BSExportMetadata script allegedly exports the metadata from files selected in Adobe's Bridge into a comma separated value (CSV) file suitable for import into Excel, Access and most database programs. It installs as a Bridge menu item making it simple to use. The the Export Metadata script provides you with an easy to use wizard allowing you to select associated information about a set of images that you can then export. This script requires Creative Suite 2 (CS2). This script sounds like it does exactly what I want to do, but unfortunately, it no longer exists.
Then I found this:
Arnold Dubin, "Script to Export and Import Keywords and Metadata" #13, 8 Aug 2005 7:23 am
I tried this procedure, but nothing seemed to happen. I also tried to copy the script into the JAVASCRIPT action option in Acrobat, but I received a message that the script had an error. It also seems to me that this script does not set up a dumping point, that is, a file into which this information will be exported to.
I am a novice, not a code writer or a programmer/developer. I need a step-by-step explanation of how to implement this filtering of information. We have about 2000 jpeg and tiff files, so I would rather not go through each file and copy and paste this information elsewhere. I need to find out how to create a batch process that will do this procedure for me. Can anyone help?Hello -
Is anyone aware of a tool that will do the above that is available for mac? Everything I've found so far seems to be PC only.
Any help is appreciated, thanks! -
Comma Separated Value Taking too Much Time to Execute
Hi,
select ES_DIAGNOSIS_CODE DC from ecg_study WHERE PS_PROTOCOL_ID LIKE 'H6L-MC-LFAN'
The above query returns comma separated value from the above query.
I am using the query below to split the comma separated value but the below query is taking lot of time to return the data.
SELECT
select DC from (
with t as ( select ES_DIAGNOSIS_CODE DC from ecg_study WHERE PS_PROTOCOL_ID LIKE 'H6L-MC-LFAN' )
select REGEXP_SUBSTR (DC, '[^,]+', 1, level) DC from t
connect by level <= length(regexp_replace(DC,'[^,]*'))+1 )
Please suggest me is there any alternative way to do this comma separated value.
Thanks
SudhirNikolay Savvinov wrote:
Hi BluShadow,
I know that this function is fast with varchar2 strings from several years of using it. With CLOBs one may need something faster, but the OP didn't menion CLOBs.
Best regards,
NikolayJust because you perceive it to be fast doesn't mean it's faster than doing it in SQL alone.
For starters you are context switching from the SQL engine to PL/SQL to call it.
Then in your code you are doing this...
select substr(v_str,v_last_break+1, decode(v_nxt_break,0,v_length, v_nxt_break-v_last_break-1)) into v_result from dual;which is context switching back from the PL/SQL engine to the SQL engine for each entry in the string.
Why people do that I don't know... when PL/SQL alone could do it without a context switch e.g.
v_result := substr(v_str,v_last_break+1, case when v_nxt_break = 0 then v_length else v_nxt_break-v_last_break-1 end);So, if you still think it's faster than pure SQL (which is what the OP is using), please go ahead and prove it to us. -
Comma Separated Values files ?!!
Is there special classes for dealing with CSV (comma separated values) to use a text file just like a database ??
thanks in advancesorry, it just sounds like a strange thing to do. Normally, you would not use CSV for persistent data storage with a High Level Language. In your design, if you wanted to refer to a particular record, you get into all sorts of problems. You could keep a note of where each record is, like what line number its on, but then you would need some way of modifying this note when you add records. Also, you would have to be sure that no-one is accessing the file outside of the program as then things will not be where the program expects them to be. You could refer to each record using some identifier, but then if you are going to start using all of this, then you may as well go the database route. If you are new to java, it will probably help you learn. I just don't envisage you ever having to use the type of design you are talking of in practice. The closest thing that you ever might use it for is if you had a plain text configuration or parameter file for a program.
-
Comma separated Values have repeated values
Find the Comma separated Values have repeated values
say
Str:= '123,abc,4566,4897996,46546546,ouiouiou,lhjlhlh,123,pojpoj,465465,123,poipoio,lahslka,'
The above sting has 123 repeated 3 times i need to make a note of it and intimate to user
can a Oracle Function does this?
Thanks!This is one way of doing so, using Pure Oracle functions:
with dat as
select ',' || '123,abc,4566,4897996,46546546,ouiouiou,lhjlhlh,123,pojpoj,465465,123,poipoio,lahslka,' col
from dual
select col, length(translate(lower(replace(col, ',123,', '~')), '~abcdefghijklmnopqrstuvwxyz1234567890-=+_)(*&^%$#@!<>?":|}{,.', '~')) occurances
from dat;
COL OCCURANCES
,123,abc,4566,4897996,46546546,ouiouiou,lhjlhlh,123,pojpoj,465465,123,poipoio,lahslka, 3 -
Need to Convert Comma separated data in a column into individual rows from
Hi,
I need to Convert Comma separated data in a column into individual rows from a table.
Eg: JOB1 SMITH,ALLEN,WARD,JONES
OUTPUT required ;-
JOB1 SMITH
JOB1 ALLEN
JOB1 WARD
JOB1 JONES
Got a solution using Oracle provided regexp_substr function, which comes handy for this scenario.
But I need to use a database independent solution
Thanks in advance for your valuable inputs.
GeorgeGo for ETL solution. There are couple of ways to implement.
If helps mark -
Enable comma separated values (CSV) output
I am trying to figure out how to (Enable comma separated values (CSV) output ) for a report. Do you have an example or info on how to do that?
Can you provide an example on how you completed the setup? I am in the same boat but can't find an example to this subject
-
Converting xml data in to comma separated values in bpel
Is there a way to covert generic xml data to comma separated value in BPEL? i have tried using createDelimitedString but no luck.
Please guide me on this issue.
Thanks!
Shan
Edited by: 876372 on Aug 3, 2011 6:58 AMHi,
Have a luk at the below link it has many examples:
http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm -
Rows into comma separated values
DB version : 11.2
I would like get rows into comma separated values
expected output
rowvalue1,<space>rowvalue2,<space>rowvalue3,<space>rowvalue4,.....Example:
create table test1 (name1 varchar2(10));
insert into test1 values ('JOHN');
insert into test1 values ('YING');
insert into test1 values ('KAREN');
insert into test1 values ('PEDRO');
commit;
SQL> select * from test1;
NAME1
JOHN
YING
KAREN
PEDROHow can I get this to printed as
JOHN, YING, KAREN, PEDROAssuming you want them in no particular order
SQL> select listagg(name1, ',') within group (order by rowid) from test1;
LISTAGG(NAME1,',')WITHINGROUP(
JOHN,YING,KAREN,PEDRO -
How to seach for a particular text in comma separated values
Hi,
I have one table for eg. TB_Fruits.
In that i have one column FruitsName(Varchar)
In that column i am storing string in comma separated values.
Select FruitsName from tb_fruits;
Result: orange,banana,apple
Now the issue is suppose if i try to insert any of these fruits name again then it should not allow me to insert.
Suppose now if i try to insert ('grapes,banana')
or
('apple,grapes')
the orange,banana,apple can be in any position.
How to check if any of these names already exist or not in the column fruitsname?
I cannot use like or INstr function here. because the position is not fixed not even string.
Appreciate any help.After doing search.
Got to know <= 3 length in word is in stoplist.
That's why the value ALL it was not searching in index.
After modifying the index this problem is solved.
CREATE INDEX
Fruitsname_idx ON tb_fruits (FruitsName)
indextype is ctxsys.context
PARAMETERS('SYNC ( ON COMMIT)
stoplist ctxsys.empty_stoplist');
But now the issue is suppose i have value with space..
i inserted one more row with value 'FRUITS YELLOW'
So in the index it is storing two rows....one is for FRUITS and second is for YELLOW.
select * from tb_fruits t where contains(t.FruitsName,'FRUITS')>0
I will get record..but actually there should be no record.
And it should allow me to insert. So i can insert the value FRUITS in more row.
Any help on how to store the value with space in one row in index??
Maybe you are looking for
-
IPhone 5s not working after voice over turned on
iPhone 5s not working after voice over turned on
-
Hi, I have changed the language to German <globalization culture="de-DE"/> but i can see the changes only in the Active viewer not in the report legend. Pls provide solution. Regards, GPS
-
Conversion problem from AppleWorks document
I have a number of documents in Appleworks format that I have opened in Pages and then saved as a Pages document. I viewed and worked on them several times, but now when I open them, some of the images are thumbnail size and some have changed places
-
After moving my /Users directories from my old mac to my new one using the migration tool, X11 refuses to install, telling me that "this system does not need this update" if I try to run the latest update, or "this system contains newer software" if
-
Inbound RFC into ECC6.0
Hi All, We have an inbound RFC from a C++ application into R/3. Up until we upgraded our R/3 system to ECC6.0 the application was working fine. After we upgraded to ECC6.0 we keep getting UserID/password incorrect. I do understand the case-sens