Using radio button in a where clause
Dears,
I'd like to filter my result using the value of a radio button in my where clause.
Could you tell me if is it the right way to do? i get an issue in my code below
DECLARE
v_counter INTEGER := 0;
v_line VARCHAR2 (4000);
v_rec_in_row INTEGER := 12;
lpar varchar2(50);
BEGIN
HTP.prn ('<table>');
HTP.prn ('<tr>');
HTP.prn ('<td>');
lpar:=v('P48_LVAR');
CASE
WHEN lpar='SERVERS'
THEN
FOR c IN
( SELECT CASE
WHEN SERVER_MARK='SUN'
THEN '<table width="">'
|| '<tr><td><a href="#WORKSPACE_IMAGES#New Image.GIF"><img src="#WORKSPACE_IMAGES#New Image.GIF"/></td></tr>'
|| '<tr><td style="text-align:center"><h1>'
|| SERVER_NAME
|| '</td></tr></a></table>'
WHEN SERVER_MARK='HP'
THEN '<table>'
|| '<tr><td><a href="#WORKSPACE_IMAGES#New Image.GIF"><img src="#WORKSPACE_IMAGES#hp.GIF"/></td></tr>'
|| '<tr><td style="text-align:center"><h1>'
|| SERVER_NAME
|| '</td></tr></a></table>'
END AS emp
FROM SERVERS
WHERE CASE
WHEN v('P48_RA_ENV')='ALL' THEN SERVER_ENV LIKE '%'
WHEN v('P48_RA_ENV')='PROD' THEN SERVER_ENV LIKE '%PROD%'
WHEN v('P48_RA_ENV')='UAT' THEN SERVER_ENV LIKE '%UAT%'
WHEN v('P48_RA_ENV')='DEV' THEN SERVER_ENV LIKE '%DEV%'
END)Thx
Celio
Acharya,
Tjis is all my code, i change it a little , it works fine in sqlworkshop but when I execute it in my page i don't get result
DECLARE
v_counter INTEGER := 0;
v_line VARCHAR2 (4000);
v_rec_in_row INTEGER := 12;
lpar varchar2(50);
BEGIN
HTP.prn ('<table>');
HTP.prn ('<tr>');
HTP.prn ('<td>');
lpar:=v('P48_LVAR');
CASE
WHEN lpar='SERVERS'
THEN
FOR c IN
( SELECT CASE
WHEN SERVER_MARK='SUN'
THEN '<table width="">'
|| '<tr><td><a href="#WORKSPACE_IMAGES#New Image.GIF"><img src="#WORKSPACE_IMAGES#New Image.GIF"/></td></tr>'
|| '<tr><td style="text-align:center"><h1>'
|| SERVER_NAME
|| '</td></tr></a></table>'
WHEN SERVER_MARK='HP'
THEN '<table>'
|| '<tr><td><a href="#WORKSPACE_IMAGES#New Image.GIF"><img src="#WORKSPACE_IMAGES#hp.GIF"/></td></tr>'
|| '<tr><td style="text-align:center"><h1>'
|| SERVER_NAME
|| '</td></tr></a></table>'
END AS emp
FROM SERVERS
WHERE SERVER_ENV LIKE CASE
WHEN v('P48_RA_ENV')='ALL' THEN '%'
WHEN v('P48_RA_ENV')='PROD' THEN '%PROD%'
WHEN v('P48_RA_ENV')='UAT' THEN '%UAT%'
WHEN v('P48_RA_ENV')='DEV' THEN '%DEV%'
END)
LOOP
v_line := v_line || c.emp || '</td><td>';
v_counter := v_counter + 1;
IF v_counter = v_rec_in_row
THEN
HTP.prn (v_line);
HTP.prn ('</td></tr><tr><td>');
v_line := NULL;
v_counter := 0;
END IF;
END LOOP;
HTP.prn (v_line);
HTP.prn ('</td></tr></table>');
WHEN lpar='ZONES'
THEN
FOR c IN
( SELECT '<table>'
|| '<tr><td><a href="#WORKSPACE_IMAGES#New Image.GIF"><img src="#WORKSPACE_IMAGES#New Image.GIF"/></td></tr>'
|| '<tr><td style="text-align:center"><h1>'
|| ZONE_NAME
|| '</td></tr></a></table>'
emp
FROM ZONES)
LOOP
v_line := v_line || c.emp || '</td><td>';
v_counter := v_counter + 1;
IF v_counter = v_rec_in_row
THEN
HTP.prn (v_line);
HTP.prn ('</td></tr><tr><td>');
v_line := NULL;
v_counter := 0;
END IF;
END LOOP;
HTP.prn (v_line);
HTP.prn ('</td></tr></table>');
WHEN lpar='ALIAS'
THEN
FOR c IN
( SELECT
'<table>'
|| '<tr><td><a href="#WORKSPACE_IMAGES#New Image.GIF"><img src="#WORKSPACE_IMAGES#New Image.GIF"/></td></tr>'
|| '<tr><td style="text-align:center"><h1>'
|| ALIAS_NAME
|| '</td></tr></a></table>'
emp
FROM ALIAS)
LOOP
v_line := v_line || c.emp || '</td><td>';
v_counter := v_counter + 1;
IF v_counter = v_rec_in_row
THEN
HTP.prn (v_line);
HTP.prn ('</td></tr><tr><td>');
v_line := NULL;
v_counter := 0;
END IF;
END LOOP;
HTP.prn (v_line);
HTP.prn ('</td></tr></table>');
WHEN lpar='FS'
THEN
FOR c IN
( SELECT
'<table>'
|| '<tr><td><a href="#WORKSPACE_IMAGES#New Image.GIF"><img src="#WORKSPACE_IMAGES#New Image.GIF"/></td></tr>'
|| '<tr><td style="text-align:center"><h1>'
|| FS_NAME
|| '</td></tr></a></table>'
emp
FROM FS
LOOP
v_line := v_line || c.emp || '</td><td>';
v_counter := v_counter + 1;
IF v_counter = v_rec_in_row
THEN
HTP.prn (v_line);
HTP.prn ('</td></tr><tr><td>');
v_line := NULL;
v_counter := 0;
END IF;
END LOOP;
HTP.prn (v_line);
HTP.prn ('</td></tr></table>');
END CASE;
END;
Similar Messages
-
How do I search a site using radio buttons
I am trying to search a site using radio buttons. I have one table and 5 columns. I have 5 radio buttons marked like 01, 02, 03,04,05. I am using Dreamweaver cs5 php, when I click the radio button 01 I will like to get the response with all 01 files. I will like to mention that the file names are like 01-010-1, 01-010-2 and than 02-020-1 and so fourth I do not know how to write the advance query
This is what I have
SELECT QBF, ADDRESS, NATSO, TSOCNT, PDF (this re my db columns)
FROM alldwgs (this is my table)
WHERE QBF like %colname% (this is the column that contains the file names 01-010-1 etc)
ORDER BY QBF ASC
I don’t know what to write on the variable box
Name: colname
Type: text
Default value: 01
Run time value: $_GET['QBF']
I hope that you understand my question I am new to this. Thank you very much for your responseThank you for your reply. I am new to editing a pdf and using these programs. I have subscribed to Acrobat XI Pro. When I try to edit the document it directs me to LiveCycle. I cannot move the table in LiveCycle. It won't let me, and I cannot make changes in XI Pro as I did in the trial as it directs me to edit in LiveCycle. Am going in circles.
-
Issue in using radio button in module pool
For same field I need 2 different search help. Based on radio button on screen I need company codeu2019s from different table. Issue is, at execution radio button remains blank. Radio button works only when I use them in PAI under CASE SY-UCOMM. WHEN u2018DONEu2019. IF Normal_Run = u2018Xu2019u2026u2026
Can I use radio button with the below code. Please refer the below code.
PROCESS ON VALUE-REQUEST.
FIELD COMP_CODE MODULE POPULATE_COMP_CODE.
MODULE POPULATE_COMP_CODE INPUT.
IF REPEAT_RUN = 'X'.
PERFORM COMP_CODE_POPULATE.
ELSEIF NORMAL_RUN = 'X'.
PERFORM COMP_CODE_POPULATE_N.
ENDIF.
ENDMODULE.
FORM COMP_CODE_POPULATE .
SELECT COMP_CODE
FROM ZIFRS_D_PROCESS
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB_CC
WHERE PROC_NAME = 'DEPRECIATION RUN'.
READ TABLE VALUES_TAB INDEX 1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'COMP_CODE'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'COMP_CODE'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB_CC.
ENDFORM. " COMP_CODE_POPULATION
FORM COMP_CODE_POPULATE_N .
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = '/BI0/SCOMP_CODE'
FIELDNAME = 'COMP_CODE'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'COMP_CODE'.
ENDFORM. " COMP_CODE_POPULATE_N
Moderator Message: Please use "code" tags to format the code snippet.
Edited by: Suhas Saha on Nov 23, 2011 5:13 PMHi
You need to make the Grouping for these Radio button on the screen
Search for how to make Radio buttons grouping
radio buttons in screen painter
http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCDWBTUT/BCDWBTUT.pdf
and search for Radio button Group in this document
assign a Function Code for one of the radio buttons(It allows for only one Radio Button)
This triggers automatic PAI so when you take the F4 Help this is readily available
In TOP include make sure you define the variables corresponding to the Radio buttons on the screen and also provide default value X to one of the Radio buttons
Hope this serves your purpose
Cheerz
Ramchander Rao.K -
How to use Radio Buttons in SAP BI 7 for a set of three fields?
Dear SAP Gurus,
We are using SAP BI 7. We need to use Radio button to select one field name (out of a set of three fields) which
appeared on selection screen.
The scenario is; we have three fields
1) Field Name A
2) Field Name B
3) Field Name C
Now, we need to select one field(using Radio button) from the above and later the report related to the above
selected field should be displayed.
The three reports will be as follows:
1) Report A
2) Report B
3) Report C
if Field Name A is selected then Report A will be displayed,
if Field Name B is selected then Report B will be displayed and
if Field Name C is selected then Report C will be displayed.
To display the report we have two cases;
1) There will be a common selection screen and all the three reports will come in single workbook but in seperate worksheet.
2) There will be a common selection screen and all the three reports will come in same worksheet, one after the other.
Is it possible to create the report in this manner, if yes, please suggest the steps.
Regards,
DV.I think you would just use commands to do the following:
1. Hide report Analysis Item 2 and Analysis Item 3 if the 1st button was pushed.
2. Hide report Analysis Item 1 and Analysis Item 3 if the 2nd button was pushed.
3. Hide report Analysis Item 1 and Analysis Item 2 if the 3rd button was pushed.
Hope that helps... -
Using Radio Buttons in widget to store Data
I am building my 2nd widget and I am curious to know if anyone has used radio buttons within the edit mode to change/modify/set variables before. I don't want a radio button widget. I want a complex menu widget that will hide/show selected items within my playbar such as the forward button.
Currently I am using User variables to determine all the hide/shows for my playbar. But I would like to make it more user friendly by having a visual widget people could use to turn buttons on off, set url's for help documents etc. And have everything be based on a per slide basis. just wondering if anyone has done anything like this in the past.
The other part of this is, can I use a widget to construct User variables. In As2 I was able to create variables in root and then set those accordingly without having to add them to every projects user variables. But it appears in AS3 it is not possible to create a variable of a clip/objects parent is anyone familiar with this?
Thanks ahead of time.
zsrcHi zsrc,
If you're using WidgetFactory then here's a post that might give you the information that you need.
http://www.infosemantics.com.au/widgetking/2010/11/widget-properties-how-theyre-used/
As far as the code you'd write in your circumstance, a radio button's selected property tells you if it's... well... selected. So you can write that to a widget property like so:
properties.MyPropertyName = myRadioButton.selected;
That line would be inside the saveProperties template method as mentioned in the article above.
override protected function saveProperties():void
properties.MyPropertyName = myRadioButton.selected;
Then you can read that property back when the widget is in the published Captivate movie.
override protected function enterRuntime():void
if (properties.MyPropertyName == true) {
// The Radio Button was selected. Do stuff
} else {
// The Radio Button wasn't selected. Do stuff? -
Using round off function in where clause
Hi All,
I'm trying to use round off function in where clause, I seek help in completing this script.
WITH CR_Details AS
(Select
request_id,
parent_request_id,
fcpt.user_concurrent_program_name Request_Name, phase_code, status_code,
round((fcr.actual_completion_date - fcr.actual_start_date),3) * 24 * 60 as Run_Time,
round(avg(round(to_number(actual_start_date - fcr.requested_start_date),3) * 1440),2) wait_time,
fu.User_Name Requestor,
fcr.argument_text parameters,
to_char (fcr.requested_start_date, 'MM/DD HH24:mi:SS') requested_start,
to_char(actual_start_date, 'MM/DD/YY HH24:mi:SS') ACT_START,
to_char(actual_completion_date, 'MM/DD/YY HH24:mi:SS') ACT_COMP,
fcr.completion_text
From
apps.fnd_concurrent_requests fcr,
apps.fnd_concurrent_programs fcp,
apps.fnd_concurrent_programs_tl fcpt,
apps.fnd_user fu
Where 1=1
and fcr.concurrent_program_id = fcp.concurrent_program_id
and fcp.concurrent_program_id = fcpt.concurrent_program_id
and fcr.program_application_id = fcp.application_id
and fcp.application_id = fcpt.application_id
and fcr.requested_by = fu.user_id
and fcpt.language = 'US'
and fcr.actual_start_date like sysdate )
select crd.*
from CR_Details crd
where Run_time <> '0'
AND wait_time <> '0'
GROUP BY
crd.request_id,
crd.parent_request_id,
crd.fcpt.user_concurrent_program_name,
crd.requested_start_date,
crd.User_Name,
crd.argument_text,
crd.actual_completion_date,
crd.actual_start_date,
crd.phase_code,
crd.status_code,
crd.resubmit_interval,
crd.completion_text,
crd.resubmit_interval,
crd.resubmit_interval_unit_code,
crd.description
Not sure about the GROUPBY function referencing the "crd." .Hi,
The best thing for you to do is start over. Start as small as possible, then take baby steps.
Pick one of the tables; fcr perhaps, and write a query that just uses that table, like this:
SELECT *
FROM apps.fnd_concurrent_requests fcr
WHERE fcr.actual_start_date >= TRUNC (SYSDATE)
AND fcr.actual_start_dt < TRUNC (SYSDATE) + 1
;(I think this is what you meant to do when you said "... LIKE SYSDATE".)
Make sure this little query gets credible results. When that tiny query is working perfectly, add another line or two. You can cut and paste code from what you posted, if that helps you.
If you get stuck, post the last version of your code that worked perfectly, and the latest version (only a line or two bigger) that has the problem. Describe what the problem is. If you get an error, post the complete error message. In any event, post CREATE TABLE and INSERT statements for all the tables and columns needed to run the query, and the results you want to get from that query.
When you post any code, format it, so that how the code looks on the screen gives some clues about how it is working.
When you post any formatted text on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
If you going to use the AVG function in the sub-query, then you probably need to do a GROUP BY in the sub-query.
If you're not using any aggregate functions (like AVG) in the main query, then you probably don't want to do a GROUP BY in the main query.
I know this is a lot of work. I'm sorry. If there was an easier way, I wouldn't ask you to do all this. -
How to disable the inputfield using radio button dynamically in module pool
How to disable the inputfield on the screen using radio button dynamically in module pool.
Please suggest .
Thanks.
Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PMI got it thank you.
LOOP AT SCREEN.
if screen-GROUP1 = 'LA1'.
If RADIO1 = 'X'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ELSEIF RADIO2 = 'X'.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE. " STATUS_0100 OUTPUT
Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM -
How to use Radio buttons in WAD to select different condition in a query
Hi Guru,
I am new to WAD, I want to use radio buttons in selection screen of query for different selections based on selection criteria. I am aware of executing different queries using different radio buttons. but i want to use single queries for different radio button selections.
I have found some relevant topic to it but not got exact solution. Please guide me.Hi Avinash,
Drag a DropDown webitem into your template. Under DropDown webitem properties, Data Binding -> Fixed List of Options.
Fixed Option -> Action -> Command via Command Wizard, Command -> Commands for Data Providers -> Data Provider Commands for Filter Values -> SET_SELECTION_STATE_SIMPLE. Data Provider Affected -> choose the main DP Query here. Characteristic -> choose Employee Group characteristic here as present in your DP Query. Sign -> INCLUDING, Operator -> EQUAL_SELECTION, Equals -> MEMBER_NAME, Member Name -> specify the value here i.e. Employee1 etc.
Repeat above Fixed Option step for Employee2, Employee3 etc. selections. For 'All' option choose Command CLEAR_SELECTION_STATE with Data Provider Affected as the main DP Query & Characteristic as Employee Group.
--Priya -
Query Tuning - using CASE statement in the WHERE clause - Duplicate Post
Duplicate Post by mistake.
Please check
Query Tuning - using CASE statement in the WHERE clause
Edited by: Chaitanya on Jun 9, 2011 2:45 AM
Edited by: Chaitanya on Jun 9, 2011 2:46 AMDuplicate Post by mistake.
Please check
Query Tuning - using CASE statement in the WHERE clause
Edited by: Chaitanya on Jun 9, 2011 2:45 AM
Edited by: Chaitanya on Jun 9, 2011 2:46 AM -
Related selects using radio button
Hi All,
I wanna use radio button with three options and one dropdown
box .
my problem is i wanna choose option from radio button and run
the related query to get the values into dropdown box and then
choose the value from drop down and submit it to another page.
Any ideas ? please help me.
Thanks in advanceGoogle coldfusion related selects and adjust the javascript
so that you are using radio buttons instead of a select.
I recently posted my own code. Look for the keyword
etiologydetail. -
Dynamic forms using radio buttons, any ideas?
Hello;
I am writting a multi-form section in a web site. I have the
form built up to the point where it sends the email. I have some
issues I am trying to figure out and need some help. First let me
show how this is set up, then the questions:
The set up:
Page 1 personal info
<cfform action="PT2.cfm" method="post"
enctype="application/x-www-form-urlencoded" name="sponsorOrder"
enablecab="no">
all the form fields that need to be filled for contact info
here
<input type="reset" name="Reset" value="Reset">
<input type="submit" name="Submit" value="Proceed to Step
2">
</cfform>
PAGE 2:
<cfform action="SENDMAIL.cfm" method="post"
enctype="application/x-www-form-urlencoded" name="sponsorOrder"
enablecab="no">
<input name="Fname" type="hidden"
value="<cfoutput>#form.Fname#</cfoutput>">
<!-- all the other hidden fields from page 1 go here
--->
<input type="radio" name="sponsor" value="1">
<input type="radio" name="sponsor" value="2">
<!-- there are 7 radio buttons to select from on this
page. All with the same name="sponsor" -->
<input type="reset" name="Reset" value="Reset">
<input type="submit" name="Submit" value="Submit">
</cfform>
SENDMAIL page:
<cfset subject = "Sponsorship Order">
<cfset email = "#form.email#">
<!----------------------------------------------------------------------->
<cfmail to="[email protected]"
cc="[email protected]"
from="#form.email#"
subject="Custom Order Request"
server="mail.myserver.com"
port=25
type="HTML">
<font face="Verdana, Arial, Helvetica, sans-serif"
color="##000000" size="2">
<b>Collected information</b><br>
<b>Customer First Name:</b>
#form.Fname#<br>
<!-- all the rest of the collected contact info goes here
-->
<!-- HOW do I bring in the radio button choice here? Is
this the right way? -->
<cfif "form.sponsor" = "1">
<b>Selection 1:</b> the info they get from
selection 1 here <br>
</cfif>
<cfif "form.sponsor" = "2">
<b>Selection 2:</b>The info that goes with
selection 2 goes here<br>
</cfif>
<!-- there are 5 more if statements that need to run here
for the rest of the radio selections -->
</cfmail>
<cfinclude template="thankyou.cfm">
THANK YOU PAGE:
Now on this page is where I get lost. I need to bring the
selection from the radio buttons over to here and serve up a button
according to the radio button selected back on page 2. Is this how
I do that? The same as I did in the sendmail?
<cfif "form.sponsor" = "1">
they get this button and info
</cfif>
<cfif "form.sponsor" = "2">
they get this button and info
</cfif>
<!-- and it goes on for 5 more selections -->
Those are my questions, as well as this.
On page 2 I need to make it impossible to pass that page
without making a selection. How do I do that with radio buttons?
Can anyone help me?
Thank you.
PhoenixIrish-Phoenix wrote:
> Hello;
> I am writting a multi-form section in a web site. I have
the form built up to
> the point where it sends the email. I have some issues I
am trying to figure
> out and need some help. First let me show how this is
set up, then the
> questions:
>
> The set up:
> Page 1 personal info
>
> <cfform action="PT2.cfm" method="post"
> enctype="application/x-www-form-urlencoded"
name="sponsorOrder" enablecab="no">
>
> all the form fields that need to be filled for contact
info here
>
> <input type="reset" name="Reset" value="Reset">
> <input type="submit" name="Submit" value="Proceed to
Step 2">
> </cfform>
>
> PAGE 2:
>
> <cfform action="SENDMAIL.cfm" method="post"
> enctype="application/x-www-form-urlencoded"
name="sponsorOrder" enablecab="no">
> <input name="Fname" type="hidden"
value="<cfoutput>#form.Fname#</cfoutput>">
> <!-- all the other hidden fields from page 1 go here
--->
> <input type="radio" name="sponsor" value="1">
> <input type="radio" name="sponsor" value="2">
> <!-- there are 7 radio buttons to select from on this
page. All with the same
> name="sponsor" -->
> <input type="reset" name="Reset" value="Reset">
> <input type="submit" name="Submit" value="Submit">
> </cfform>
>
> SENDMAIL page:
> <cfset subject = "Sponsorship Order">
> <cfset email = "#form.email#">
>
<!----------------------------------------------------------------------->
> <cfmail to="[email protected]"
> cc="[email protected]"
> from="#form.email#"
> subject="Custom Order Request"
> server="mail.myserver.com"
> port=25
> type="HTML">
> <font face="Verdana, Arial, Helvetica, sans-serif"
color="##000000" size="2">
>
Collected information<br>
>
Customer First Name: #form.Fname#<br>
> <!-- all the rest of the collected contact info goes
here -->
>
> <!-- HOW do I bring in the radio button choice here?
Is this the right way? -->
> <cfif "form.sponsor" = "1">
>
Selection 1: the info they get from selection 1 here
<br>
> </cfif>
> <cfif "form.sponsor" = "2">
>
Selection 2:The info that goes with selection 2 goes
here<br>
> </cfif>
> <!-- there are 5 more if statements that need to run
here for the rest of the
> radio selections -->
> </cfmail>
> <cfinclude template="thankyou.cfm">
>
> THANK YOU PAGE:
>
> Now on this page is where I get lost. I need to bring
the selection from the
> radio buttons over to here and serve up a button
according to the radio button
> selected back on page 2. Is this how I do that? The same
as I did in the
> sendmail?
>
> <cfif "form.sponsor" = "1">
> they get this button and info
> </cfif>
> <cfif "form.sponsor" = "2">
> they get this button and info
> </cfif>
> <!-- and it goes on for 5 more selections -->
>
> Those are my questions, as well as this.
> On page 2 I need to make it impossible to pass that page
without making a
> selection. How do I do that with radio buttons?
> Can anyone help me?
> Thank you.
>
> Phoenix
>
hi phoenix!
ok, let's see...
your "thank you" page is cfincluded in the "sendmail" page,
so it will
have all the passed form vars available to it, which means
you do not
have to store the radio button selection in the session scope
or
anywhere else...
i think a cfswitch/cfcase construct to check for selected
radio button
will serve you better than lots of cfif/cfelseif/cfelse...
as for preventing submission of page2 without selecting a
radio button
first:
a) pre-select one
b) use client-side javascript to make sure one is selected
(use an
onsubmit event in the form tag or onclick event in the button
- you will
have to change the button type from submit to button, and
change its
name from submit to something else - there are possible
issues with
having a button named submit in your form if you are
suibmitting the
form through js...
c) you could also use server-side cfml to check that a radio
button is
selected but it requires a lot of extra code and changes to
your
forms/pages...
Azadi Saryev
Sabai-dee.com
Vientiane, Laos
http://www.sabai-dee.com -
Custom Color Picker using Radio buttons??
I'm trying to create a custom color picker as Apex color picker has tooo many colors. I thought a radio button would work if I could program the text to also display the color, but the following sql shows the formatted text in the result.
SELECT '<font color="'||color_id||'"><b>'||color_name||'</b></font>' d, color_name r FROM colors
<font color="#F0F8FF"><b>AliceBlue</b></font>
<font color="#FAEBD7"><b>AntiqueWhite</b></font>
<font color="#00FFFF"><b>Aqua</b></font>
<font color="#7FFFD4"><b>Aquamarine</b></font>
I know I can make text different colors in a report using this technique.
Any ideas?
Thanks,
Drew
Application Express 4.2.3.00.08ABD - DBA wrote:
I'm trying to create a custom color picker as Apex color picker has tooo many colors. I thought a radio button would work if I could program the text to also display the color, but the following sql shows the formatted text in the result.
SELECT '<font color="'||value2||'"><b>'||value||'</b></font>' d, value r FROM lov where type='COLOR'
<font color="#F0F8FF"><b>AliceBlue</b></font>
<font color="#FAEBD7"><b>AntiqueWhite</b></font>
<font color="#00FFFF"><b>Aqua</b></font>
<font color="#7FFFD4"><b>Aquamarine</b></font>
I know I can make text different colors in a report using this technique.
The font element has been deprecated for many years, is now obsolete, and must not be used by authors.
To control the presentation of text, use a suitable semantic text element with CSS. If no suitable semantic text element exists, use span:
<span style="color: #00FFFF; font-weight: bold;">Aqua</span> -
Using if logic in the where clause of a select statement
I have a select clause. And in the select clause there is a variable all_off_trt that can be 'Y' or 'N'.
In the where clause I want to make it so that if a form variable is checked and all_off_trt is 'Y' then
exclude it else if the form variable isn't checked then select it no matter what all_off_trt is.
Is there any way to include either and if statement or a case statement within the where clause to acheive this? If not is there another way of doing it?
Basically I am looking for a case statement like this
case
when all_off_trt = 'Y' and mail_para.code = 'Y' then false
else true
end
Message was edited by:
Tugnutt7Ok, so that really doesn't solve my problem. I have 3 different fields that I need to do that with. Each combining in a select statement to print an email list, as well as other thing limiting the where clause.
This is currently what I have, tested and working 100%.
cursor email_cur is
select unique p.email,s.all_off_trt,s.all_deceased,s.no_enroll
from participant p, trialcom t, ethics s
where p.status='A'
and p.surname=t.surname
and p.initials=t.initials
and s.trial_cd = t.tricom
and s.centre = t.centre
and p.email is not null
and (t.centre in (select code from mail_parameters where user_name=user and mail_para='CENTRE')
or 'XX' in (select code from mail_parameters where user_name=user and mail_para='CENTRE'))
and (t.tricom in (select code from mail_parameters where user_name=user and mail_para='TRIAL')
or 'XX' in (select code from mail_parameters where user_name=user and mail_para='TRIAL'))
and (t.role in (select code from mail_parameters where user_name=user and mail_para='ROLE')
or 'XX' in (select code from mail_parameters where user_name=user and mail_para='ROLE'))
and (p.country in (select code from mail_parameters where user_name=user and mail_para='COUNTRY')
or 'XX' in (select code from mail_parameters where user_name=user and mail_para='COUNTRY'))
and (t.represent in (select code from mail_parameters where user_name=user and mail_para='REPRESENT')
or 'XX' in (select code from mail_parameters where user_name=user and mail_para='REPRESENT'));
This is in a program unit that runs when a button is clicked. At the end of that I need to add on the 3 case statements that help further narrow down the selection of emails to be printed. Then it prints the emails selected from this statement into a file. So it has to be done right in the select statement. The three table variables are the all_off_trt, all_deceased, and no_enroll. The form has 3 checkboxes. One for each, that when checked (giving the variable associated with the checkboxes a value of 'Y') excludes all emails that have a 'Y' in the coresponding table variable. -
Using bind variable in dynamic where clause and concatenate with query
Hi,
In my procedure i am framing where clause dynamically with bind variable,When i am concatenate this with my sql query for REF CURSOR i got sql command not properly ended exception.
Is it possible to pass values to the bind variable through the dynamic variable/value?
Please advise
Thanks in advance
Siva
IF in_applicationId IS NOT NULL THEN
optional_where := optional_where || ' AND a.APPLICATION_ID like '||':e%';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'||',in_queue_id'||',in_applicationId';
END IF;
My query is like this
open Out_Main FOR SelectQuery USING optional_usingThanks for reply,
In my procedure, i suppose to frame the where clause with bind dynamically according to the input parameters. so that i am framing the values of the bind variables also dynamically like this,
Please advise...
IF in_assignedAppFlag IS NOT NULL THEN
IF in_assignedAppFlag = 'Y' THEN
optional_where := optional_where || ' AND b.ASSIGNED_TO = :b' ;
optional_using := ' in_appFuncGroup'||',in_currentUserID';
ELSe
IF in_isSupervisor = 0 THEN
optional_where := optional_where || ' AND (b.ASSIGNED_TO = :b'||' OR b.ASSIGNED_TO = ''-1'' OR b.ASSIGNED_TO IS NULL)';
optional_using := ' in_appFuncGroup'||',in_currentUserID';
END IF;
END IF;
ELSE
IF in_isSupervisor = 0 THEN
optional_where := optional_where || ' AND (b.ASSIGNED_TO = :b'||' OR b.ASSIGNED_TO = ''-1'' OR b.ASSIGNED_TO IS NULL)';
optional_using := ' in_appFuncGroup'||',in_currentUserID';
END IF;
END IF;
IF in_appFuncGroup IS NOT NULL THEN
optional_where := optional_where || ' AND e.APP_FUNC_GROUP= :c';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup';
END IF;
IF in_queue_id IS NOT NULL THEN
optional_where := optional_where || ' AND b.QUEUE_ID = :d';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'||',in_queue_id';
END IF;
IF in_applicationId IS NOT NULL THEN
optional_where := optional_where || ' AND a.APPLICATION_ID like '||':e%';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'||',in_queue_id'||',in_applicationId';
END IF;
IF in_sourceCode IS NOT NULL THEN
optional_where := optional_where || ' AND e.APP_SOURCE_CODE like '||':f%';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
||',in_queue_id'||',in_applicationId'||',in_sourceCode';
END IF;
IF in_logo IS NOT NULL THEN
optional_where := optional_where || ' AND appProds.PRODUCT_TYPE like '||':g%';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo';
END IF;
IF in_firstName IS NOT NULL THEN
optional_where := optional_where || ' AND upper(a.FIRST_NAME) like upper(:h%)';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo'||',in_firstName';
END IF;
IF in_surName IS NOT NULL THEN
optional_where := optional_where || ' AND upper(a.SURNAME) like upper(:i%)';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo'||',in_firstName'||',in_surName';
END IF;
IF in_retreival_id IS NOT NULL THEN
optional_where := optional_where || ' AND e.RETREIVAL_ID like :j%';
optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo'||',in_firstName'||',in_surName'||',in_retreival_id';
END IF; -
Using radio button selection in multiple tables
Hello All,
I've got a bit of a design issue and it being a Friday my brain is a bit foggy and I can't seem to figure out a solution.
what I want to do is have 3 tables. The user should only be able to select one line from any of the three tables.
I can do this by having events that clear down selection on the two other tables on any selection of the third, but the select buttons of tables don't really give the UI impression that only one row can be selected. To do this I'd like to use the radio button element.
so
table A
choice - name
(o) - Anne
(o) - Bob
(o) - Charlie
Table B
choice - name
(x) - David
(o) - Ellen
(o) - Fran
Table C
choice - name
(o) - George
Here the entry in table B for David is selected. But any selection of any of the other options should deselected.
My thoughts are to use a radio button ui element, bind the "selected" value to a unique id for each row/table (an attribute of the node element for each table) and the value to a common shared attribute (not table specific).
Any better ideas - and certainly any which would mean I'm not going to have to maintain a lookup table of my unique ids and node elements to find out which one is selected?
Cheers,
ChrisOk - here's how I did it.
I created another lookup table which had a guid and reference to the element.
in the each elements I had a guid which I bound to the key for selection property of the radio button in the table.
I then bound the selected key property to an attribute that was common to all elements.
in my "processing" logic I read the selected key, read the lookup table - and therefore got the reference to the selected element.
Would have been an awful lot easier if I could have used a reference to the element itself as the "key" - but that was required to be a character field.
[image showing radio button selection working across multiple tables|http://i51.tinypic.com/bi79dx.jpg]
End result works quite nicely.
Cheers,
Chris
Maybe you are looking for
-
I need to add text using interactive --> button option in InDesign CS4. This particular text has to appear when I mouse the text in PDF after generating from InDesign CS4. I don't want to add those text in PDF itself. Indesign CS3 has button opti
-
Is there a way to reset my messages account, I can't get iMessage to work on IPad nor Mac osx. Help please this is really frustrating.
-
SA Schedule lines for requirements within PTF
Hello Gurus, I have a question that you can surely help me with. I have setup a scheduling agreement for a material, and with the source list setup the MRP now successfully generates schedule lines for all requirements that are outside of the plannin
-
Solution for viewing AR credit memo relevant to AP invoice
In R12, we no longer have the functionality of applying miscellaneous receipts to credit memos. Using this functionality in 11i, we were able to make payments through AR. In 11i, we were using API (AR_CM_APPLICATION_PUB.activity_application) for crea
-
Hi, I'm trying to set-up distributed transactions for weblogic. We have a requirement to go against 2 different databases within a single transaction. My config.xml looks like: <JDBCConnectionPool Cap