Multiple Checkbox Values Into One Field
Hopefully someone can help me with this issue I'm having.
I'm trying to save the values of multiple selected checkboxes into one field separated by commas through ADDT's Insert Transaction code. I can do this easily with DW's standard insert record wizard by using the PHP implode() function but I haven't been able to figure it out with ADDT's code.
<form>
<input type="checkbox" value="1" name="program[]" /> Program One
<input type="checkbox" value="2" name="program[]" /> Program Two
<input type="checkbox" value="3" name="program[]" /> Program Three
<input type="checkbox" value="4" name="program[]" /> Program Four
</form>
THIS IS ADDT'S CODING
$ins_quoteManager->addColumn("programs", "STRING_TYPE", "POST", "programs");
THIS WORKS VIA DREAMWEAVER'S INSERT RECORD WIZARD
Original: GetSQLValueString($_POST['programs'], "text"),
Modified: GetSQLValueString(implode(',',$_POST['programs']), "text"),
Anyone know how to modify the ADDT code with the implode function to get this to work?
Have you tried ADDT´s "comma-separated checkboxes" form control, which will also store the values into a field of your choice (and of course retrieve them from there on update record - pages) ? The only possible drawback might be, that the checkboxes can´t be defined statically, means that the array of value/label - pairs will be retrieved from another table by establishing an additional recordset.
Cheers,
Günter
Similar Messages
-
10GR2 - How can I load multiple row values into one field?
Hi
Can anyone please help with a problem I'm having with merging data.
The source table has multiple entries for the same Id e,g,
ID Code
1 123
1 234
2 123
2 567
The output should only have one row per ID e.g.
ID Code_List
1 123;234
2 123;567
Do you know what operator I could use that would allow me to do this? I've looked at unpivot but I think I would need multiple output fields (one for each Code). I have to concatinate the codes and separate with a semi-colon.
Thanks
GBQ) Input data
=============
COL_0,COL_4
1235,"G0123,G124,G25,G6"
1236,"G01,G23,G124,G25,G6"
1237,"G0123,G1,G24,G25,G6"
1238,"G,G0123,G124,G25,G6"
1239,"G0123124,G256"
Output
======
TEST_ID,TEST_VAL
1235,G0123
1235,G124
1235,G25
1235,G6
1236,G01
1236,G23
1236,G124
1236,G25
1236,G6
1237,G0123
1237,G1
1237,G24
1237,G25
1237,G6
1238,G
1238,G0123
1238,G124
1238,G25
1238,G6
1239,G0123124
1239,G256
I wrote this procedure...
declare
rcd_cnt number;
test_id123 number;
junk_1 number;
cd_occurences number;
child_count number;
str_abc varchar2(200);
char_pos number default 0;
cd_temp_str varchar2(50);--:= 'G0123,G124,G25,G6';
begin
select nvl(count(col_4),0) into rcd_cnt from test_ee where col_4 is not null;
for aa in 1 .. rcd_cnt loop
select col_0,rownum rn,nvl(trim(col_4),0) into test_id123,junk_1,cd_temp_str from (select col_0,rownum rn,col_4 from test_ee where col_4 is not null) where rn = aa;
--dbms_output.put_line('...I am in for loop...' || cd_temp_str);
--dbms_output.put_line('===================' || rcd_cnt || '.................' ||aa);
cd_occurences := length(cd_temp_str) - length(replace(cd_temp_str,','));
dbms_output.put_line(cd_temp_str || '...Str Occurences are ...'||cd_occurences ||'**************'||test_id123);
child_count :=0;
for z in 1..length(cd_temp_str)+1 loop
child_count := child_count+1;
if(instr(cd_temp_str,',') > 0) then
char_pos := instr(cd_temp_str,',',1,1);
str_abc := substr(cd_temp_str,1,char_pos-1);
dbms_output.put_line('..Partial String of..'|| z ||'..is.....' || str_abc);
insert into test_xx(test_id,test_val) values(test_id123,str_abc);
end if;
cd_temp_str := substr(cd_temp_str,char_pos+1,length(cd_temp_str));
if(cd_occurences=child_count) then
dbms_output.put_line('..Partial String of..is.....' || cd_temp_str);
insert into test_xx(test_id,test_val) values(test_id123,cd_temp_str);
end if;
end loop; -- close for of z */
--dbms_output.put_line('...I am in end for loop...');
end loop; -- close for of aa
end;
instead of procedure,is there any way from sqlqery. -
Get multiple values into one field
I want to get following two rows into one record.
Thank you in advance!
ID Name Category
109 John C1
109 John D8
Result:
ID Name Category
109 John C1, D8hi, i used centinul suggestion to create this is query.
WITH tablet AS
(SELECT '109' AS ID, 'John' AS NAME, 'C1' AS CATEGORY
FROM DUAL
UNION ALL
SELECT '109' AS ID, 'John' AS NAME, 'D8' AS CATEGORY
FROM DUAL)
SELECT ID, NAME,
LTRIM
(MAX (SYS_CONNECT_BY_PATH (CATEGORY, ','))KEEP (DENSE_RANK LAST ORDER BY ID),
) AS CATEGORY
FROM (SELECT ID, NAME, CATEGORY,
ROW_NUMBER () OVER (PARTITION BY ID ORDER BY CATEGORY)
AS curr,
ROW_NUMBER () OVER (PARTITION BY ID ORDER BY CATEGORY)
- 1 AS prev
FROM tablet)
GROUP BY ID, NAME
CONNECT BY prev = PRIOR curr AND ID = PRIOR ID
START WITH curr = 1;or
WITH tablet AS
(SELECT '109' AS ID, 'John' AS NAME, 'C1' AS CATEGORY
FROM DUAL
UNION ALL
SELECT '109' AS ID, 'John' AS NAME, 'D8' AS CATEGORY
FROM DUAL)
SELECT ID, NAME, SUBSTR (SYS_CONNECT_BY_PATH (CATEGORY, ','),
2)CATEGORY
FROM (SELECT ID, NAME, CATEGORY, COUNT (*) OVER (PARTITION BY ID) cnt,
ROW_NUMBER () OVER (PARTITION BY ID ORDER BY CATEGORY) seq
FROM tablet)
WHERE seq = cnt
START WITH seq = 1
CONNECT BY PRIOR seq + 1 = seq AND PRIOR ID = ID;Edited by: DeepakDevarapalli on Nov 12, 2009 2:45 PM
Edited by: DeepakDevarapalli on Nov 12, 2009 2:46 PM -
Insert/Update multiple checkbox values into a table
Hi all,
I created an interactive report with checkboxes in it.
My application is like,
step 1: user will give his ID in a text box and click on 'submit' which redirects to IR page which has got checkboxes
step 2: IR report displays all the environments and access levels as two of its columns
step 3: if user checks on some box in IR, those particular environments and access levels (may be multiple environments and access levels) for that particular ID should get inserted into a table.
I have created a model application at http://apex.oracle.com/pls/apex/f?p=71510:20 (wokspace:test_me, username=test, paswrd: apex14gm)
I found this forum too, https://forums.oracle.com/thread/2387391?start=0&tstart=0. But I am confused of how to implement it!
How to achieve this??
Pls help me out....
Thanks in advanceHi Kanishkaa,
I've taken a look at your application.
So the things that I noticed that are wrong:
1)Your report: You created 2 items but you gave the 2 items the same idx. This is really weird I'm not sure if APEX knows how to handle this. Don't give 2 items the same idx. Furthermore you need to create 2 additional hidden items since you also want to store the access level and the environment.
2)The PL/SQL Process: Your PL/SQL Process: your making a type t_checkboxes, but your not actually doing anything with this type. Your not giving this any value. So obviously you get an error.
You really should rewrite this process based on the process in my blog. Please read it again carefully, if you just use the one insert statement you are using then even if you write a correct process that doesn't give any errors, the wrong data will be inserted.
Regards,
Joni -
XML Unbounded values into one field - Message Mapping
Dear All,
I am trying to convert an unbounded multifield XML structure to a 0.1 field so that the maltiple values are mapped into a single fields in semi-colon seperated fasion.
The source:
<MT_dates>
<date>05-10-2011</date>
<date>10-11-2011</date>
<date>10-12-2011</date>
<date>10-13-2011</date>
</MT_dates>
date field is 0.. unbounded
target
<MT_dates>
<dates>05,10,2011;10,11,2011;10,12,2011;10,13,2011</date>
</MT_dates>
dates field is 0 .. 1
can anybody please help?
Regards,
Haikchk this:
input will be : var1
execution type All values of a context
int a = var1.length;
String b="";
for(int i=0;i<a;i++)
b =b +var1<i> + ";";
int c=b.length();
String output =b.substring(0,c-1)
result.addValue(output);
date-UDF--dates -
Problem in Showing multiple values into one text box.
Hi all,
How can show i multiple row values into one text box. here text box is multi line type.
i have one table it has content column, it has number of rows. i need to show those data into one text box in form. how can i solve it?
my sample code here,
egin
--:block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;
-- go_item('txt_from');
insert into chat(fromid,toid,content)values(:block3.fromid,:block3.toid,:block3.txt_From);
:block3.txt_From:= null;
commit;
:block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;
go_item('txt_from');
declare
cursor c4 is select content from chat where toid = :block3.fromid;
rec1 c4%rowtype;
begin
open c4;
loop
fetch c4 into rec1;
exit when c4%notfound;
null;
end loop;
end;
--select content into :block3.txt_to from chat where toid= :block3.fromid;
end;
please give me some tips to solve it.
thanks
gurusHi,
Try giving CHR(10) for line feed.
DECLARE
CURSOR C4 IS SELECT CONTENT FROM CHAT WHERE TOID = :BLOCK3.FROMID;
Str_Temp VARCHAR2(20);
BEGIN
:BLOCK3.TXT_TO := '';
OPEN C4;
LOOP
FETCH C4 INTO Str_Temp;
EXIT WHEN C4%NOTFOUND;
:BLOCK3.TXT_TO := :BLOCK3.TXT_TO || CHR(10) || Str_Temp;
END LOOP;
CLOSE C4;
END;Regards,
Manu.
If this answer is helpful or correct, please mark it. Thanks. -
SQL Query -How2bring multiple results into one field using Formatted Search
Hi Everyone
i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
SELECT dbo.LOT_ITEM.LOT
FROM dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
WHERE dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
(for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
Thankyou in advance :o)
Edited by: Asma Bi on Apr 23, 2008 7:22 PM
Edited by: Asma Bi on Apr 23, 2008 7:24 PMHi Suda
Thanks for replying :o) but im not sure about the query?
just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
SELECT dbo.ixvSerialNoFact.SRI1_IntrSerial
FROM dbo.DLN1 INNER JOIN
dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
WHERE dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
The above brings me the relevant results but when i change it to be used in a formatted search:
SELECT dbo.ixvSerialNoFact.SRI1_IntrSerial
FROM dbo.DLN1 INNER JOIN
dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
WHERE dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
i think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
Thanks
Edited by: Asma Bi on Apr 24, 2008 3:53 PM
Edited by: Asma Bi on Apr 24, 2008 3:55 PM -
BI for NW04S: Concatenating multiple chars into one field in BI query
Hi,
We have BI for NW04S. We have a requirement of concatenating multiple characteristics into one field in the BI report. This single field should have the usual drill down and other olap functionalities that a single characteristic usually enjoy in a BI report.
In BI for NW04 (Not the S) this probably can be done using the table interface in WAD. However in BI7 WAD functionality are through Java.
Also can this be done using Query designer alone.
Can anybody help?
ThanksHi,
Can you please elaborate on your Query designer option. You can always have a variable and in the user exit can write code, but what is not clear that
1> How will you acheive the contatenation done for every row of the report in the BEX user exit variable( since it's called during the beginning of the query execution and not for all rows of the report
2> How do you transfer the char variable into a char field in the report.
Please elaborate .
Thanks -
Storing and retrieving multiple values into one cookie.
Hi Everyone,
I am wondering if anybody knows of any good tutorials involving storing multiple values into one cookie. Any URLs will be greatly apprecated. Thanks heaps.
Regards
DavoThese are normally delimted in HTTP by a semicolon. You can concatenate the string yourself and on the reverse trip use StringTokenizer to get the values back out.
- Saish -
Get value of two fields into one field
Hellou,
i need little help with javascript again
Currently i'm using code below to get value from one field to other:
getField("Text35").value = getField("Text1").valueAsString;
Now i'm wondering how to change this code, so i could get values from two fields into one. For example i have field "firstname" and field "lastname", now i want to show this in field "name".
Example, if field firstname have value John and field lastname value is Doe, i want to show it in field name like "John Doe".
I hope that u understood what i want
Thanks for helping me!getField("Text35").value = getField("Text1").valueAsString + " " +
getField("Text2").valueAsString; -
Best approach to join multiple statistics tables into one
I have read different approaches to join multiple statistics tables into one, they all have a column "productobjectid".
I want to get all data for each product and put it to excel and output a jpg statistic with cfchart.
How would you do this, the sql part?
Thanks.A couple suggestions:
1) when joining tables, its best to list both table/fields that you are joining in the FROM clause:
FROM shopproductbehaviour_views INNER JOIN shopproductbehaviour_sails ON shopproductbehaviour_views.productobjectid = shopproductbehaviour_sails.productobjectid
2) You add tables to a SQL join by placing another join statement after the SQL above:
SELECT *
FROM TableA INNER JOIN TableB on TableA.myField = TableB.myField
INNER JOIN TableC on TableA.anotherField = TableC.anotherField
3) If you have columns in the tables that are named the same, you can use column aliases to change the way they appear in your record set:
SELECT TableA.datetimecreated 'tablea_create_date', TableB.datetimecreated 'tableb_create_date'
4) Certainly not a requirement, but you might want to look into using <cfqueryparam> in your where clause:
WHERE shopproductbehaviour_sails.productobjectid = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#all.productobjectid#">
You might want to consider checking out one of the many tutorials on SQL available online. Many of the questions you posed in your post are covered in pretty much every basic SQL tutorial. Alternately, a good SQL book is worth its weight in gold for a beginning web applications developer. -
I want to access multiple checkbox value(its true or false when clicked)
dear sir
i want to access multiple checkbox value whether its true or not from one jsp to another jsp.how i can do this. because based upon checkboxes records are deleted and added.
when i check on checkboxes and click on delete button the records are deleted onlybased upon checks.and these request forward to another jsp.so plz tell me about this.
for example in gmail yahoomail or other mail various checkboxes are there. and if we check them and click on delete button then all checks mail are deleted.
i will be very thankul to u sir..
plz tell me.in this time i m in problem of this type.Disabled fields and unselected checkboxes/ radio buttons/ list elements are not tranmitted when a form is submitted. So when you try to getParameter() you'll only get the selected fields or you'll get a null if the field was disabled/ not selected.
When you use this for a set of checkboxes/ radio button, you'll only get the selected ones. If nothing was selected, you'll get null. Work on your logic with this in mind.
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
(Yes I know it's on JavaRanch but I think it applies everywhere)
---------------------------------------------------------------- -
Concatenate multiple row values into single column value
Hello,
Can anyone please refresh my memory on how to concatenate multiple row values into a single column value.
In the following query, I will get multiple denial reasons per application and I would rather return all denial reasons on one line.
SELECT a.application_id, a.membership_number,
r.reason_text AS denial_reason,
a.appl_receipt_date AS application_receipt_date,
a.plan_request_1 AS application_plan_code,
a.adjudication_date AS application_denial_date
FROM application a, PLAN p, application_reason ar, reason r
WHERE a.plan_request_1 = p.plan_cd
AND a.application_id = ar.application_id
AND ar.reason_id = r.reason_id
AND a.adjudication_cd = 'D'
AND a.appl_receipt_date BETWEEN '01-jan-2006' AND '31-dec-2006'
AND p.plan_type_id = 12 and a.application_id = :appId
ORDER BY application_id
Any help is greatly appreciated.
Thanks,
-Christinefound the following
SELECT deptno,
LTRIM(MAX(SYS_CONNECT_BY_PATH(ename,','))
KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
FROM (SELECT deptno,
ename,
ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) AS curr,
ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) -1 AS prev
FROM emp)
GROUP BY deptno
CONNECT BY prev = PRIOR curr AND deptno = PRIOR deptno
START WITH curr = 1;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 ADAMS,FORD,JONES,SCOTT,SMITH
30 ALLEN,BLAKE,JAMES,MARTIN,TURNER,WARD
3 rows selected.at http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php -
Multiple Phase values at one frequency
Hi,
I have done the frequency response analysis for a device using the frequency response example from sound and vibration toolkit and i get multiple
phase values at one frequency how can i reduce it to one value without any error i am posting the result from the experiment please check
and give me suggestions are the stimulus and response phase values supposed to be like that????
Attachments:
DAQ freq resp_trial 2.vi 171 KB
Freq resp results.JPG 260 KB
file.vi 17 KBSK,
You have serious problems in your File.VI. Why are your writing to your file and then reading it right back? Worse, there is no guarantee that the File write will actually occur before the File Read. You have a race condition set up there between those two Spreadsheet File VI's.
If you want to maintain a history of whatever has already been written to the file, you should be building it into an array and storing in a shift register. Even if your File.vi would by chance work the way you want it to, storing data in the file system is much slower than maintaining your data in memory.
As for your while loop, it is going to run as fast as it can with respect to all the functions occurring inside of it. Is it possible you are getting 14 iterations of that while loop for each frequency step that is occurring?
Message Edited by Ravens Fan on 07-25-2009 01:35 AM -
Error Message When Merging Multiple PDF Files into One PDF File
Good Morning,
I have a problem with Adobe Acrobat 9 Pro. I am trying to merge/combine multiple PDF files into one PDF file, but I keep receiving this error message:
Does anyone have a fix for this? Thank you!To fix:
Provide a unique name for each form field. This includes the individual PDFs fields. As you intend to combine/merge no field name in each of the individual PDFs can be the same.
Be well...
Maybe you are looking for
-
File problem - checking the existence of a remote file
I have absolute paths to several text files from a ftp server (which don't require any authentication and can be accessed over the internet). I am trying to write a Java method that can check any of the above absolute ftp file paths and returns true/
-
Create Shopping Page gives Javascript Error - Sun JVM in a DMZ?
Hi SDN We are running on SRM 5.0, with server at 5.5 and we have just implemented SP 11. Since then, our users running IE with the Sun JVM 1.4.2_10 are getting a JavaScript error everytime an applet loads on their page (in this case, it is the appl
-
Hi Guys, I have an Iphone 4s and a yellow mark appears on my screen whereas my warrantly is expire since February. I go to a Genius Bar and the refuse to take care of my problem. As I saw on Internet it's a latent defect (glue problem) but Apple refu
-
NullPointerException question (probably easy)
Hi, I am currently using a JDK 1.2 release from 1999 or so. In a class, I have an array: class foo { double bar[]; In a method, I populate the array: void foobar () bar = new double[13]; bar[0] = 0.0; ... // all 13 elements assigned values Nothing el
-
Change iPhone number for outgoing calls from mac (Yosemite)
I have two iPhones, and one of the iPhone is set for iPhone cellular calls (handoff) in macbook under FaceTime preference. How to change this number so that I can make outgoing calls from different iPhone?