Adding field values into multiple lines in a dynamic table
Hello!
I have create this form (timesheet) where I have a dynamic array with a variable number of lines (I'm adding instances with a single click of a button).
All rows with a field of totalLinhaRelatorio , it is a time field and I need all of these fields to be added to get a total final.
So, I tried these two lines of script (FormCalc):
var finalTotal = sum (Time2Num (rio parteInferior.atividades.tabelaAtividades.linhaAtividade [*] [*] .totalLinhaRelato, "HH: mm"))
$.formattedValue = Num2Time (finalTotal, "HH: mm")
It doesn´t works as I expected. The field gets properly just the value of the first row.
I tried other combinations, such as linhaAtividade.totalLinhaRelatorio [*] and .totalLinhaRelatorio linhaAtividade [*], but nothing seems to work.
Help, please!
Marcos
You're welcome Marcos!
Yes, it is possible, but I've never used FormCalc to do, preferring to JavaScript. As you use the time functions, it makes sense to stick with FormCalc.
Take a look at the syntax here:
http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000211.html.
Hope that helps,
Niall
Tags: Adobe LiveCycle
Similar Questions
-
Convert a single column into multiple lines
Hi people,
I have a task to display a single column into multiple lines (for use in LOV)
For Ex:
The column consistes of value such as 98,78,67,68,34,90. -It's a unique column values where none of the values can be ' number that is separated by commas
Then we must view it as
98
78
67
68
34
90
-under the number of lines (no lines can be ' do not number).
Thanks in advanceTry this...
SQL> ed Wrote file afiedt.buf 1 select regexp_substr('98,78,67,68,34,90', '[^,]+',1,level) Value 2 from dual 3* connect by level <= regexp_count('98,78,67,68,34,90',',') + 1 SQL> / VALUE ----------------- 98 78 67 68 34 90 6 rows selected.
Thank you!
-
Simple question: how to divide the string into multiple lines concatenated?
Hi people,
Maybe it's an easy question.
How to split a string that is concatenated into multiple lines by using the SQL query?
ENTRY:
Delimiter = ', '.select 'AAA,BBB,CC,DDDD' as data from dual
Expected results:
I'm looking for something nice to feature "an opposite to «sys_connect_by_path»»data ------------ AAA BBB CCC DDDD
Thank you
Tomaswith t as (select 'aaaa,,bbbb,cccc,dddd,eeee,ffff' as txt from dual) -- end of sample data select REGEXP_SUBSTR (txt, '[^,]+', 1, level) from t connect by level <= length(regexp_replace(txt,'[^,]*'))+1 REGEXP_SUBSTR(TXT,'[^,]+',1,LE ------------------------------ aaaa bbbb cccc dddd eeee ffff
-
Compare the column values for multiple lines
I am new to oracle and I have a requirement to compare the values of column across multiple lines. If all column values are the same, I want to display that value, if the columns are not the same, I need to display 'no match' as value. I need id to group values and display a status value based on the above logic. Can anyone offer assistance with dispalying the result expected below?
Sample
Table
State ID
1 S
2 L
1 S
2 S
expected results
State ID
1 S
2 no match
Hello
That's what you asked for:
SELECT id
CASE
WHEN COUNT (DISTINCT status) > 1
THEN "no match."
For ANOTHER MIN (status)
The END as status
T
GROUP BY id
;
Want that if each State ID is NULL? The CASE expression above returns NULL in this situation.
-
Several checkboxes in a form into multiple lines
Here's the problem I have. I have a table with a list of products and orders. I need to match products to orders in an orginizational page.
I created a repeat region and a set of product images which uses images of products and id to create a list. This part works just fine and it is part of the submission form. The code looks like this:
<? PHP {? >}
< li > <? PHP echo "" < img src = "... / images /', $row_imageListRS ["imageName"] ', '" width = "172" height = "120" > < br / > "
', $row_imageListRS ["altDescription"];? >
< input type = "checkbox" name = 'imgID' value = "<?" PHP echo $row_imageListRS ['id']? ">" / > < br / >
<? PHP echo $row_imageListRS ['id'];? > < /li >
< input type = "hidden" name = "userID" value = "<?" PHP echo $row_currentUserRS ['userID'];? ">" / >
< input type = "hidden" name = "glryID" value = "<?" PHP echo $row_pageRS ['id'];? ">" / >
< input type = "hidden" name = "MM_insert" value = "form1" / >
<? PHP} while ($row_imageListRS = mysql_fetch_assoc ($imageListRS));? >
(that didn't fit in the box formatting)
It gives me a well-formatted list of all products with a checkbox for each image.
Other information is a user ID and an ID of order that also work very well.
I created a function to insert which should work to populate a database table that has only 3 columns other than the primary ID. The columns are, userID, glryID and imgID. I want to be able to review the order and check a bunch of images of the generated list and then click on the submit button and have a new line generated for each image ID.
The problem I have is that the insert loop isn't looped and I get only the first digit of the information. Here's the code for that:
for ($i = 0, $len = count($_POST['imgID']); $i < $len; $i++) { $insertSQL = sprintf("INSERT INTO glryImages (userID, imgID, glryID) VALUES (%s, %s, %s)", GetSQLValueString($_POST['userID'][$i], "int"), GetSQLValueString($_POST['imgID'][$i], "int"), GetSQLValueString($_POST['glryID'][$i], "int")); mysql_select_db($database_mbtseaDB, $mbtseaDB); $Result1 = mysql_query($insertSQL, $mbtseaDB) or die(mysql_error());
I can't understand why I get only one entry per shipment, and I can't understand why I get only the first digit.
For example, if the user ID is 93 and the ID of the image is 42 and the page id is 12 on line of the resulting table is userID 9 imgID 4 and glryID 1.
I'm sure that the error is in the first line of code for the Insert method. Any help would be appreciated.
I thought I would post the solution because it was a simple thing to overlook. After you set the loop of the boxes I called the original again variable in the insert method. Whatever it took, it was change the line in the middle of the insertion section-
GetSQLValueString ($_POST ['imgID'], "int").
at GerSQLValueString ($imgID, "int").
The crazy is that I made the same mistake before a dozen times. Set a value, and then call the definition instead of the value of the whole...
Thanks to all who watched and didn't see the same thing I don't see. H hope this helps someone else.
-
Change the field values of multiple text searching a word/words in their name.
Hello
So in my document, I load all the text fields roughly the same name than just with slight variations in their name.
For example:
FldTxt
FldTxt1
P1. TemplateName.FldTxt
P1. TemplateName.FldTxt1
... Etc.
The way this works is that each individual text box represents a parameter for a single element, so in this case there are 4 products.
Is the way in which these parameters are selected, the user presses a button that generates a copy of a template page.
On this page are a group of checkboxes, buttons and drop-down lists, these particular text fields display the value of a drop-down list.
This is so that when the user has finished with the generated page, it can be removed and all the information is stored on the main page for later in the process.
Because of how the elements of work means that fields can either displays a 'None selected' or option selected, BUT they cannot stand by the option that was selected.
For example;
FldTxt "none".
FldTxt1 "selected Option2.
P1. TemplateName.FldTxt "selected Option2.
P1. TemplateName.FldTxt 'None Selected '.
I hope this explains the theory behind it.
So I wonder is what I could put these text fields values by searching for a keyword in their name? For example. If the field has "FldTxt" in its name, and its value is not equal to "None Selected", change its value to the value of the drop-down list of the most recent.
The reason why I want to do it in this way is because there is no predefined number of these text fields, there might be only 2 or 200 because it depends on the number of items in the form.
So I imagine it would go something like this;
for (var i=0; i<this.numFields; i++) { var f = this.getField(this.getNthFieldName(i)); var nameSearch = //search for keywords in a field name var dropdown = //the name of the dropdown if (f.nameSearch == "FldTxt" && if f.type = "textfield") { if (f.value !== "None Selected") { f.nameSeach.value = dropdown.value;
My apologies if the syntax is incorrect or even impossible, but I don't know exactly what I'm asking check I just know what would be the outcome.
I know that we can search for words in a document so I wonder if it is possible for domain names
Your code is not quite correct. If I understand this code should do the trick (you may need to adjust the names of fields and values, however):
var nameSearch = "FldTxt"; var dropdown = this.getField("Dropdown").value; for (var i=0; i
-
Split a string of html into multiple lines
I'm trying to convert a string into several lines using REGEX, can someone tell me if this is achievable using expressions regular oracle
WITH qry AS)
SELECT ' < p > < /p > < p > two < /p > < p > 3 < /p > ' Str
OF THE DOUBLE
)
SELECT
-regexp_replace)
-regexp_replace)
regexp_substr (str,
' [^ < (/?) p >]. (*', 1, LEVEL)
(-, '< p >', ")
(-, "< /p >", ")
AB
OF qry
CONNECTION OF LEVEL < = LENGTH (regexp_replace (str, ' [^ < (/?) p >]. * "")) + 1
;
Output current:
1 a < /p > < p > two < /p > < p > 3 < /p >
2 (null)
3 (null)
4 (null)
Expected results:
1 a
2 two
3 three
user2022369 wrote:
You are right that I excluded NULL, 8 rows out put to our example looks correct to me
The result included "two" because its locked up in one of our separators
'
I'm not sure of any character that never appear in str
Thank you
Something like:
WITH qry AS)
SELECT "Hello World
one
a header
a text orhere goestwo
more text herethree ' str
OF the double
)
SELECT THE LEVEL,
REGEXP_SUBSTR)
Str,
'(())? (.*?) (()|$)',
1,
LEVEL,
'I,
4
) ab
OF qry
CONNECT BY LEVEL<>
Str,
'(())? (.*?) (()|$)',
1,
'I '.
)
/
LEVEL AB
---------- --------------------------------------------------
1 Hello World
2 a
3 a header
a text orhere goes
4 two
5 more text here
6 three6 selected lines.
SQL >
SY.
-
value of multiple line in a single row (nclob)
Hello
I have a requirement where I have to work on a nclob data type column, now here the value of 2 lines in a single column. Like this:
Select extractvalue (xmltype (details), '/ Anything/invoiceNumber') separate as invoices,
actinguserid as user_id, createdt
of bchistevent where bucket = 201301
and upper (type) = ' COM. AVOLENT. PRESENTATION. EVENT. INVOICEDOWNLOADEVENT'
- and bchistevent.bucket = to_char (add_months (sysdate-1), "YYYYMM")
000-395452969-20130103 1.46388193452398E37 08/01/2013 03:05:42
300000590-000-20090723 1.46388193452398E37 11/01/2013 08:11:45
300000590-000-20090723 1.46388193452398E37 11/01/2013 08:12:50
000-395453127-20130103 1.46388193452398E37 14/01/2013 04:44:26
* 300084670-000-20120906, 300084671-000-20120906 * 1.46388193452398E37 07/01/2013 12:45:19 AM
000-395452626-20130103 1.46388193452398E37 08/01/2013 03:03:57
000-300084679-20120906-1.46388193452398E37 11/01/2013 08:10:47
300000728-000-20090731 1.46388193452398E37 11/01/2013 08:19:19
000-300084679-20120906 1.46388193452398E37 14/01/2013 12:31:48 AM
300000590-000-20090723 1.46388193452398E37 14/01/2013 04:13:19
000-395452718-20130103 1.46388193452398E37 08/01/2013 07:10:19
000-300084679-20120906 1.46388193452398E37 23/01/2013 06:54:11
000-300084679-20120906 1.46388193452398E37 22/01/2013 03:11:54
300000590-000-20090723 1.46388193452398E37 11/01/2013 08:14:02
000-395453127-20130103 1.46388193452398E37 14/01/2013 04:33:12
000-300084679-20120906 1.46388193452398E37 22/01/2013 03:03:36
000-300084679-20120906 1.46388193452398E37 14/01/2013 12:34:13 AM
000-395452997-20130103 1.46388193452398E37 07/01/2013 03:31:38
000-395452391-20121027 1.46388193452398E37 03/01/2013 04:40:05
and the value of the "BOLD" highlighted line is coming in a single line, please help how to break this in 2 rows?
Published by: user1175303 on March 13, 2013 05:43user1175303 wrote:
the value of the column that is involved is here I get 2 values in a single column, and for this reason, I am unable to get the desired result.300084670-000-20120906, 300084671-000-20120906 If you have XML question but try to solve in Oracle? Why
is the owner of two invoice numbers? In any case: with t as ( select distinct extractvalue(xmltype(details),'/Anything/invoiceNumber') as invoices, actinguserid as user_id, createdt from bchistevent where bucket = 201301 and upper(type) = 'COM.AVOLENT.PRESENTATION.EVENT.INVOICEDOWNLOADEVENT' ) select regexp_substr(invoices,'[^,]+',1,column_value) invoices, user_id, createdt from t, table( cast( multiset( select level from dual connect by level <= length(regexp_replace(invoices,'[^,]')) + 1 ) as sys.OdciNumberList ) ) /
SY.
-
How to update columns with the value of other lines in the same table
Hello
I use Oracle 11.2, I'd use SQL statements to update a column based on values in other rows in the same table. Here are the details:
create table TB_test (number 4 myId, crtTs date, date of MDPU);
insert into tb_test (1, to_date ('20110101', 'YYYYMMDD'), null);
insert into tb_test (1, to_date ('20110201', 'YYYYMMDD'), null);
insert into tb_test (1, to_date ('20110301', 'YYYYMMDD'), null);
insert into tb_test (2, to_date ('20110901', 'YYYYMMDD'), null);
insert into tb_test (2, to_date ('20110902', 'YYYYMMDD'), null);
After you run the SQL code, I would like to have the following result:
1, 20110101, 20110201
1, 20110201, 20110301
1, 20110301, null
2, 20110901, 20110902
2, 20110902, null
Thanks for your suggestion.I guess you need this, otherwise please explain logic correctly:
SQL> merge into tb_test t 2 using ( 3 select rowid as rid 4 , lead(crtts) over(partition by myid order by crtts) as updts 5 from tb_test 6 ) v 7 on (t.rowid = v.rid) 8 when matched then update 9 set t.updts = v.updts 10 ; 5 rows merged. SQL> select * from tb_test order by 1,2; MYID CRTTS UPDTS ---------- --------- --------- 1 01-JAN-11 01-FEB-11 1 01-FEB-11 01-MAR-11 1 01-MAR-11 2 01-SEP-11 02-SEP-11 2 02-SEP-11
-
view multiple lines in the advanced table
Hi all
I have a requirement. I created advancedtable. When the page loads, to display 4 rows at a time. Can anyone please help how to achieve this req
Kind regards
MuraliHello
Write the code below in AM that will create 5 blank lines in the advanced table.
xxVOImpl voImpl = getxxLineVO1();
voImpl.setWhereClause ("1 = 2");
voImpl.executeQuery ();
for (int i = 1; i)<=5>=5>
{
Line = voImpl.createRow ();
voImpl.insertRow (row);
row.setNewRowState (Row.STATUS_INITIALIZED);
row.setAttribute ("column1", i);
row.setAttribute ("column2", "XYZ");
}Kind regards
Mary -
Cutting into multiple lines line values
I have the table with columns like below
Table name: Test
Column name: Col1, col2, col3, col4
Values of column as below
col1 col2 col3 col4
A cod mod ss; AA; DD ff; Gg; AAS; feq
B asd; DFG; as fgh null
Ouput: I'm looking:
col1 col2 col3 col4
A cod ss dd
A mod gg aa
A ff aas
A feq
B asd fgh
B dfg
B as
Can someone help me on this?
But if you insist
with
a trial in
(select 'A' col1, col2 "cod;) MOD','ss; AA; FF' col3, col4 'dd, gg, ASA, feq' Union double all the
Select ' B', ' ASD. DFG; ACEs ', 'Natacha', the double null
)
Select col1,
NULLIF (regexp_substr (NVL(col2,'~'), "[^;]")) +', 1, level),'~ ') col2.
NULLIF (regexp_substr (NVL(col3,'~'), "[^;]")) +', 1, level),'~ ') col3.
NULLIF (regexp_substr (NVL(COL4,'~'), "[^;]")) +', 1, level),'~ ') col4
of the test
connect by level<= greatest(regexp_count(nvl(col2,'~'),';'),regexp_count(nvl(col3,'~'),';'),regexp_count(nvl(col4,'~'),';'))="" +="">=>
and prior col1 = col1
and prior sys_guid() is not null
COL1 COL2 COL3 COL4 A COD SS DD A MOD AA GG A - FF AAS A - - FEQ B ASD FGH - B DFG - - B as - - Concerning
Etbin
-
Single field into multiple lines of cutting
Hi allwith res in the
(select 10 as id, 'history of medic' as the title of double union )
Select 20 as id, 'hospital of oklahoma heart' as the title of double union
Select 30 as id, ' Date/time end " like double title " )
Select disitnct
a.ID, a.title
res a
Output of the above code:
ID TITLE
10 background medic
Heart 20 oklahoma hospital
30 latest End Date/time
Here's my task, I need an output like below.
ID TITLE
10 past
10 medic
10 history
20 oklahoma
heart 20
Hospital 20
30 last
30 end
30 date/time
Thanks in advance.
A simple search can do wonders for you
-
How to merge values into a line, based on distinct values in another column
I have a table like
updatedby updateddate text
Approval John 1st May 2009 1 added file
Approval of John 1 May 2009 2 added file
May 2, 2009 1 deleted David approval form
I need the text column values to be concatenated and displayed for unique (updatedby updateddate) records. The output is something like
updatedby updateddate text
Approval of May 1, 2009 John save further approval 1 sheet, 2 added
May 2, 2009 1 deleted David approval form
I had planned to do it using PLSQL. Is there a way to achieve this in SQl...? Please suggestSQL> ed Wrote file afiedt.buf 1 with t as (select 'John' as updatedby, to_date('01-May-2009','DD-MON-YYYY') as updateddate, 'Approval record 1 added' as text from dual union all 2 select 'John', to_date('01-May-2009','DD-MON-YYYY'), 'Approval record 2 added' from dual union all 3 select 'David', to_date('02-May-2009','DD-MON-YYYY'), 'Approval record 1 removed' from dual) 4 -- END OF SAMPLE DATA 5 -- 6 select updatedby, updateddate, ltrim(sys_connect_by_path(text,','),',') as text 7 from ( 8 select updatedby, updateddate, text, row_number() over (partition by updatedby, updateddate order by text) as rn 9 from t 10 ) 11 where connect_by_isleaf = 1 12 connect by rn = prior rn+1 and updatedby = prior updatedby and updateddate = prior updateddate 13 start with rn = 1 14* order by 2 SQL> / UPDAT UPDATEDDA TEXT ----- --------- ---------------------------------------------------------------------------------------------------- John 01-MAY-09 Approval record 1 added,Approval record 2 added David 02-MAY-09 Approval record 1 removed SQL>
Edited by: BluShadow May 21, 2009 12:37
Argh! hair to the pole by SY -
Insert some values into multiple tables. One of the tables has a complex primary key.
Hello, I am using Jdeveloper version 11.1.2.3.0
I have a FORM_TYPE table and another table Str. The table of Str is used to translate the strings from the name of the table which are read from another program from the database and used to generate forms...
The FORM_TYPE table has a relationship with the table of STR via formtype.title_str_id = str.str_id.
STR. table has a primary key which is based on the mf_language and str_id. columns I generated the entity for the table of STR, but impossible to insert new values of add-on application for some reason any... It is said that recording invalidates its own entity...
I am trying to create a table that will be editable and will have the column Description, name, cdes in English, Str in French etc...
To create a Form_Type and at the same time insert new values for each language. But can not do the inserts of the new work of STR...
Also the FormType.TITLE_STR_ID already has a lot of null values in the database.
SELECT FormType.DESCRIPTION,
FormType.FORM_TYPE_ID,
FormType.NAME,
FormType.PAPER_REPORT_FORMAT,
FormType.PAPER_REPORT_NAME,
FormType.TITLE_STR_ID,
in. En_str str,
in. STR_ID,
en.object_name en_object_name,
Fr. Str,
Fr. STR_ID,
Fr.object_name,
of the. Str,
of the. STR_ID,
du.object_name,
BG.Str,
BG. STR_ID,
BG.object_name
OF FORM_TYPE FormType.
(select str.str_id, str.mf_language_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'fr') en
(select str.str_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'fr') en,.
(select str.str_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'from'),
(select str.str_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'bg') bg
WHERE
FormType.title_str_id = en.str_id and
FormType.title_str_id = fr.str_id and
FormType.title_str_id = du.str_id and
FormType.title_str_id = bg.str_id
Each table that you want to update must have its own entity object. You need to connect it to an another VO/OS using the associations/view links
-
Submitting a form by creating multiple lines in the DB table
Hi all
I created a new Apex application and have created a table with columns - USER_ID, ADDRESS, TELEPHONE, CREATEDON etc.
I want to read the USER_ID of the user and complete this field on the form and fill in the CREATEDON field with the date system. These two fields are hidden on the form.
Now, when the user fills his address and phone on the form and click on send, 3 identical rows are inserted into the DB table. The values of user and date system are set correctly.
To set the UserID field, I inserted a $APP_USER. in the default value of the form section. I am not able to understand why the Apex is to insert several lines even when you click the submit button once.
Help, please.
The problem is solved now. I noticed that add default values for the form fields added process duplicate. That's why the form has been processed three times. Remove the additional process solved the problem.
Maybe you are looking for
-
Satellite A660 - software DVD 3D works expired or is secretly changed
Whats going on; Why lynched to pay an extra $59 for software to do my work in 3D satellite? Ok.This probably sounds nuts; but my software DVD Blu - Ray Toshiba seems to have a DVD/Blu-ray inside prevention program. Prevent 3D questions and smaller. I
-
Replacement of keyboard on the Satellite A100-528
Hello. I have a Toshiba Satellite A100-528 and the keyboard no longer works. I found on ebay a keyboard of a Satellite L100 laptop and I want to know if this keyboard fits on my laptop. Waiting for your response.Thank you
-
I just got a license of AWR file, but it doesn't work, help!
-
When I double-click an application on my desktop nothing happens
To run the application I have to right click on the application icon (ex: Word) and when the menu opens, I have to click the tab open to run the application. How can I fix this problem. I tried to configure selective startup options, but this has not
-
Cannot set the password for user connection in Vista Home Basic
My laptop (running Vista SP2) has no password on the user account. Guest account is disabled and my user account is administrator. I would like to add a password to secure my PC a little more by doing the following:AutoScan (Vista Orb) > Control Pane