Choose whte records to show based on paramater value
Post Author: chrisbg
CA Forum: Formula
I have a report that will bring back all the customers in table. Sometimes i want to only select one customer not all the customers.
WhileReadingRecords;if {?CustomerCode}='ALL' then{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator}else{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator} and{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE} = {?CustomerCode}
after creating this formula the report doesnt even run. is there a way to say if ALL is value in the parameter then return everything and a customer such as ABC123 is entered only return customer ABC123?
Post Author: SKodidine
CA Forum: Formula
You have two parameters, {?SessionOperator} and {?CustomerCode}. If the user enters 'ALL' for {?CustomerCode} then you want to fetch all records in the customer table which match that particular userid entered for {?SessionOperator}; otherwise fetch only those records which match userid = {?SessionOperator} and customercode = {?CustomerCode}. Am I correct? If that is the case then the below selection criteria should do the job.
if {?CustomerCode}='ALL' then{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator} and {CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE} = {CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE}
else{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator} and{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE} = {?CustomerCode}
Your original formula should work. If this is not what you expected, could you elaborate and give some examples?
Similar Messages
-
Fetch records from Database based on Input value
Hi Experts,
In my mobile application, I have designed one input field with F4 help or input assist. I need to fetch records from database based on that input and need to display records in table.
My question is:
How to fetch the records from database/back end based on the input value and display them as table format as we are doing in SAP ABAP?
Here, I need to fetch the records based on input value available in the UI screen and pass that value to gateway, fetch the records from database and need to bind with table in SAPUI5.
Kindly share the whole process flow with sample code for this requirement. Hope I have explained the requirement in detail.
Thanks In Advance..
Regards,
Arindam Samanta.Hi,
Try something like this.
In this, I am passing From date, To date, RelGrp, RelStr, Uname as input. Then I am storing those values in variables and passing this data in Odata request.
OData.read({ requestUri: "http://xxxx:8000/sap/opu/odata/sap/Z188_PO_SRV/pos?$filter=Docdate le datetime'"
+ todateformat+"T00:00:00' and Docdate ge datetime'"
+ fromdateformat+"T00:00:00' and RelGrp eq '"
+ relcode +"'and RelStr eq '"
+ relstg +"'and Uname eq '"
+ username+ "' "},
function (data) {
console.log(data);
When we are giving correct inputs it will goes to Success function and get the data from back end.
In console we can see the data.
Hope this will helps to you.
Thanks&Regards
Sridevi -
Hide Repeating Frames based on data value
Hello,
Wonderful forum. Hope someone out there can give us input on this one. We have a report where we would like to show a different layout depending on the data value from the master query. One layout occupies a full 8X11 page and the second layout occupies 1/3rd of a page. Is it possible to hide one reapeating frame and show the other based on data value? This would be a multiple page report and each page will have to take the correct payout depending on the value of the data in the row.
I appreciate any input on this. Thanks
RaviThanks for you input. I appreciate it.
I am having a problem doing this. Let us say i have 2 differnt paper layouts. I want to show or hide one of the layouts based on a data value.
The problem i am facing is that the 2nd instance of true value for showing the 1st layout is over lapping the 1st instance of the 2nd layout thus showing 2 layouts overlapping each other on the same page. I know this is confusing but i will attempt to give an example:
page 1 shows - layout #1 only is showing based on result of data value. This is good.
page 2 shows - layout #2 shows based on data value, but also the 2nd instace of layout #1 (what ever data record satisfies layout #1 rule) is also showing over layout #2. So both the layouts are jumbled up on 1 page.
Essentially conditional formatting on layout #1 is not able to recognize that there is a 2nd layout taking its place and thus showing the layout #1 whenever it finds data which satisfies the condition on the 2nd page and so on..
Any help is greatly appreciated.
Thanks.. -
Show new page table record based on parameter value in first page in ADF
I have to show a selected record on a new page whose input query value is in first page. For example I choose to edit an order id by selecting order id and then pressing Edit Record button then in new page selected order record should show. I am working in ADF JSF pages. I can pass parameter from one page to another by pageFlowScope. but how to display selected record on next page.
any one to help. I want to use an input parameter on first page to edit the table on new page
-
Choosing the records to save in a database based block
Hi everybody,
I'm working with oracle 10g forms builder, I have a database based block.. in which I'll populate a number of records retrieved from a cursor. In that block, I have a non database item which a checkbox.
The user can select the records he wants to save by setting the checkbox to check.
Only the selected records should be checked.
Can anyone please help me implementing that.
Thanking you all in advance.
Cheers.Commit processing in Forms is an all or nothing process. You cannot pick and choose which records will be commited during a Commit_Form or Commit call. Based on your description, I don't see why you would need to use the checkbox to keep track of which records are new since you state that you add the records through a cursor and then to save them. Forms already keeps track of which records were queried into a block and which records are new so a simple call to Commit_Form will accomplish what you want without the need to manually keep track of which records are new.
Hope this helps,
Craig
If a response is helpful or correct, please mark it accordingly. -
Purchasing Cube -- 0PUR_C01.. "Added record" is showing zero in request
When i try to load the data to this cube, my trasfer record is showing values while Added Record is showing zero values. Whats the problem. Please advise !!
Hi,
Check whether do you have defined the industry sector in R/3. This has to be done before filling the setup table. search the forums with note no 353042.
This is done with the help of Transaction MCB_ which you can find in the OLTP IMG for BW (Transaction SBIW) in your attached R/3 source system.
Here you can choose your industry sector. 'Standard' and 'Consumer products' are for R/3 standard customers, whereas 'Retail' is intended for customers with R/3 Retail only.
You can display the characteristics of the process key (R/3 field BWVORG, BW field 0PROCESSKEY) by using Transaction MCB0.
If you have already set up historical data (for example for testing purposes) by using the setup transactions (Statistical Setup Programs) (for example: Purchasing: Tx OLI3BW, material movements: OLI1BW) into the provided setup tables (for example: MC02M_0SCLSETUP, MC03BF0SETUP), you unfortunately have to delete this data (Tx LBWG). After you have chosen the industry sector by using MCB_, perform the setup again, so that the system fills a valid transaction key for each data record generated. Then load this data into your connected BW by using 'Full update' or 'Initialization of the delta process'. Check, whether the system updates data into the involved InfoCubes now.
If all this is not successful, please see Note 315880, and set the application indicator 'BW' to active using Transaction 'BF11'.
Regards,
Anil Kumar Sharma .P -
Records Not Showing Up On Report
I'm using Crystal XI
I can take the query from "Show SQL Query..." and paste it into a query screen in SQL Server 2008 management studio and retrieve the correct records. However, the report itself does not contain all the records the should have been returned.
To the best that I can figure, the records where a transaction date (date/time field) is null is not showing up on the report. I only display the field, do not do any calculations based on the field.
It is part of the record selection formula, where I test for the field to be between start/end parameters or is null (which produces the correct SQL query as I stated above)
So why are the records not showing up on the report, and more importantly, how do I get them to show up?
TIAIt already was set to "Exception for Nulls"
On the other hand, just on a whim, I tried reversing the order of the query from what it was:
{MyQuery.Company = {?Company}
And
{MyQuery.Transaction_Date} In {?Start/End Date}
Or
IsNull({MyQuery.Transaction_Date})
To:
{MyQuery.Company = {?Company}
And
IsNull({MyQuery.Transaction_Date})
Or
{MyQuery.Transaction_Date} In {?Start/End Date}
And that seemed to work. I'm not sure why it will work in the Mangement Studio, but not in Crystal Reports, but at least it works.
Thanks for the tug in the right direction. -
All Records not showing in Report
Hi All,
U just solved my amount problem....
But now i gives my earlier problem again, means displaying only 1 rows, when i executing for 1 month in selection criteria...and amount showing right total of all records...
example---
Document No......Doc. date.......P.date........Vendor..........Name.........Tax Code.........Base Amt....... Tax Amt........Ven. Ref.........P. Doc...
5500000022 .......22.04.2008 ...28.04.2008....1011............XXXXXXX........NB..................500,000............25,000.............A-102.......4500034463
This Document No. is my 1st Document no. (5500000022)..
Here Base Amount (500,000) & Tax Amount (25,000) is the total of more than 100 records total but showing in Single Row...(This rows showing the only 1st record)...
Here what is the problem in my program...where i m wrong in clearing the itab or itab2...
please let me know...
I m again sending my corrected Program...
Code-----
REPORT zak_form_c4 NO STANDARD PAGE HEADING LINE-SIZE 125 .
TABLES : bsik,bkpf,bseg,j_1imovend,lfa1,t001,t005u,bsak,ekko,bsis, ekkn, anla, anlc.
TYPE-POOLS : slis.
DATA : BEGIN OF itab OCCURS 0,
hkont LIKE bseg-hkont, "Gl account
mwskz LIKE bseg-mwskz, "Tax Code
dmbtr LIKE bseg-dmbtr, "Amount
buzei LIKE bseg-buzei, "line item
ebeln LIKE bseg-ebeln, "Purchasing Document
ebelp LIKE bseg-ebelp, "line item nbr
hwbas LIKE bseg-hwbas, "Base amount
shkzg LIKE bseg-shkzg, "Debit/Credit code
belnr LIKE bsik-belnr, "Document number
gjahr LIKE bsik-gjahr, "Fiscal Year
bldat LIKE bsik-bldat, "Document Date
budat LIKE bsik-budat, "Posting Date
lifnr LIKE bsik-lifnr, "Vendor number
xblnr LIKE mkpf-xblnr, "Ven invoice nbr
name1(25), "name1
ort01 LIKE lfa1-ort01, "City
j_1ilstno LIKE j_1imovend-j_1ilstno, " Vendor tin nbr
regio LIKE lfa1-regio, "Region Code
bezei LIKE t005u-bezei, "Region desc
dmbtr1 LIKE bseg-dmbtr, "Amount
hwbas1 LIKE bseg-hwbas, "Base amount
END OF itab.
DATA : BEGIN OF itab3 OCCURS 0.
INCLUDE STRUCTURE itab.
DATA:END OF itab3.
DATA : wa LIKE LINE OF itab.
DATA : BEGIN OF itab1 OCCURS 0.
INCLUDE STRUCTURE itab.
DATA:END OF itab1.
DATA : BEGIN OF itab2 OCCURS 0.
INCLUDE STRUCTURE itab.
DATA:END OF itab2.
***********************************Purchase order history
DATA: BEGIN OF bet OCCURS 50.
INCLUDE STRUCTURE ekbe.
DATA: END OF bet.
DATA: BEGIN OF bzt OCCURS 50.
INCLUDE STRUCTURE ekbz.
DATA: END OF bzt.
DATA: BEGIN OF betz OCCURS 50.
INCLUDE STRUCTURE ekbez.
DATA: END OF betz.
DATA: BEGIN OF bets OCCURS 50.
INCLUDE STRUCTURE ekbes.
DATA: END OF bets.
DATA: BEGIN OF xekbnk OCCURS 10.
INCLUDE STRUCTURE ekbnk.
DATA: END OF xekbnk.
DATA : w_container TYPE scrfname VALUE 'CL_GRID',
w_cprog TYPE lvc_s_layo,
g_repid LIKE sy-repid,
w_save TYPE c,
w_exit TYPE c,
cl_grid TYPE REF TO cl_gui_alv_grid,
cl_custom_container TYPE REF TO cl_gui_custom_container,
it_fld_catalog TYPE slis_t_fieldcat_alv,
wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,
layout TYPE slis_layout_alv,
col_pos LIKE sy-cucol ,
alvfc TYPE slis_t_fieldcat_alv.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : hkont LIKE bseg-hkont OBLIGATORY. "GL Code
*SELECT-OPTIONS : hkont FOR bseg-hkont .
SELECT-OPTIONS : belnr FOR bsik-belnr .
SELECT-OPTIONS : gjahr FOR bsik-gjahr .
SELECT-OPTIONS : bldat FOR bsik-bldat.
SELECT-OPTIONS : budat FOR bsik-budat.
SELECTION-SCREEN : END OF BLOCK b1.
PERFORM fill_catalog1 USING:
'HKONT' 'ITAB2' 'G/L Code' ,
'BELNR' 'ITAB2' 'Document Number',
'GJAHR' 'ITAB2' 'Year',
'BLDAT' 'ITAB2' 'Doc. date' ,
'BUDAT' 'ITAB2' 'Posting Date',
'LIFNR' 'ITAB2' 'Vendor',
'NAME1' 'ITAB2' 'Name',
'EBELN' 'ITAB2' 'Purchasing Document',
'MWSKZ' 'ITAB2' 'Tax Code',
'HWBAS' 'ITAB2' 'Base Amount',
'DMBTR' 'ITAB2' 'Tax Amount',
'XBLNR' 'ITAB2' 'Vendor Inv. No.'.
SELECT DISTINCT hkont belnr gjahr bldat budat INTO CORRESPONDING FIELDS OF TABLE itab
FROM bsis
WHERE bukrs = '1000'
AND hkont = hkont
AND belnr IN belnr
AND gjahr IN gjahr
AND bldat IN bldat
AND budat IN budat.
SORT itab BY belnr.
LOOP AT itab.
SELECT * FROM bseg WHERE belnr = itab-belnr AND gjahr = itab-gjahr
AND bukrs = '1000'
AND ( ebeln <> ' ' OR hkont = hkont ).
IF sy-subrc = 0.
itab-buzei = bseg-buzei.
itab-mwskz = bseg-mwskz.
IF bseg-ebeln <> ' '.
itab-ebeln = bseg-ebeln.
itab-ebelp = bseg-ebelp.
MODIFY itab.
ENDIF.
IF bseg-hkont = hkont.
itab-shkzg = bseg-shkzg.
itab-hwbas = bseg-hwbas.
itab-dmbtr = bseg-dmbtr.
IF itab-shkzg = 'H'.
itab-dmbtr = itab-dmbtr * ( -1 ).
ENDIF.
MOVE-CORRESPONDING itab TO itab2.
APPEND itab2.
ENDIF.
ENDIF.
ENDSELECT.
ENDLOOP.
LOOP AT itab2.
SELECT SINGLE * FROM ekko WHERE ebeln = itab2-ebeln.
IF sy-subrc = 0.
itab2-lifnr = ekko-lifnr.
ENDIF.
CALL FUNCTION 'ME_READ_HISTORY'
EXPORTING
ebeln = itab2-ebeln
ebelp = itab2-ebelp
webre = 'X'
TABLES
xekbe = bet
xekbz = bzt
xekbes = bets
xekbez = betz
xekbnk = xekbnk.
itab2-xblnr = bet-xblnr.
SELECT SINGLE * FROM lfa1 WHERE lifnr = itab2-lifnr.
itab2-name1 = lfa1-name1.
itab2-ort01 = lfa1-ort01.
itab2-regio = lfa1-regio.
SELECT SINGLE * FROM t005u WHERE bland = itab2-regio
AND spras = 'EN'
AND land1 = 'IN'.
itab2-bezei = t005u-bezei.
SELECT SINGLE * FROM j_1imovend WHERE lifnr = itab2-lifnr.
IF sy-subrc = 0 .
itab2-j_1ilstno = j_1imovend-j_1ilstno. " Vendor tin nbr
ENDIF.
MODIFY itab2.
ENDLOOP.
SORT itab2 BY belnr.
LOOP AT itab2.
DATA : cnt TYPE i,
cnt1 TYPE i.
itab1-dmbtr1 = itab1-dmbtr1 + itab2-dmbtr.
itab1-hwbas1 = itab1-hwbas1 + itab2-hwbas.
AT END OF belnr.
cnt = sy-tabix.
cnt1 = cnt - 1.
DO cnt1 TIMES.
DELETE itab2.
ENDDO.
CLEAR itab2.
itab2-dmbtr = itab1-dmbtr1.
itab2-hwbas = itab1-hwbas1.
MODIFY itab2 TRANSPORTING dmbtr hwbas .
ENDAT.
ENDLOOP.
layout-zebra = 'X' .
layout-colwidth_optimize(1) = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZAK_FORM_C4'
is_layout = layout
it_fieldcat = it_fld_catalog
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = itab2
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*& Form FILL_CATALOG1
text
-->P_FIELDNAME text
-->P_REF_TABLE text
-->P_SCRTEXT text
FORM fill_catalog1 USING p_fieldname TYPE any
p_ref_table TYPE any
p_scrtext TYPE any.
CLEAR : wa_fld_catalog.
wa_fld_catalog-fieldname = p_fieldname.
wa_fld_catalog-tabname = p_ref_table.
wa_fld_catalog-seltext_s = p_scrtext.
wa_fld_catalog-seltext_m = p_scrtext.
wa_fld_catalog-seltext_l = p_scrtext.
wa_fld_catalog-datatype = 'CURR'.
wa_fld_catalog-outputlen = 20.
APPEND wa_fld_catalog TO it_fld_catalog.
ENDFORM. " fill_catalog1.
Plz let me know...
ThanksHello Prince,
I just want that my code will show single time records..and Sum of base Value and Tax amount...
You want to summarise Base Value and Tax amount per document, right
I am making a very very small modification to the declaration of ITAB:
DATA :
BEGIN OF itab OCCURS 0,
belnr LIKE bsik-belnr, "Document number "--> Add here
buzei LIKE bseg-buzei, "line item "--> Add here
hkont LIKE bseg-hkont, "Gl account
mwskz LIKE bseg-mwskz, "Tax Code
dmbtr LIKE bseg-dmbtr, "Amount
" buzei LIKE bseg-buzei, "line item "--> Delete Here
ebeln LIKE bseg-ebeln, "Purchasing Document
ebelp LIKE bseg-ebelp, "line item nbr
hwbas LIKE bseg-hwbas, "Base amount
shkzg LIKE bseg-shkzg, "Debit/Credit code
" belnr LIKE bsik-belnr, "Document number "--> Delete here
gjahr LIKE bsik-gjahr, "Fiscal Year
bldat LIKE bsik-bldat, "Document Date
budat LIKE bsik-budat, "Posting Date
lifnr LIKE bsik-lifnr, "Vendor number
xblnr LIKE mkpf-xblnr, "Ven invoice nbr
name1(25), "name1
ort01 LIKE lfa1-ort01, "City
j_1ilstno LIKE j_1imovend-j_1ilstno, " Vendor tin nbr
regio LIKE lfa1-regio, "Region Code
bezei LIKE t005u-bezei, "Region desc
dmbtr1 LIKE bseg-dmbtr, "Amount
hwbas1 LIKE bseg-hwbas, "Base amount
END OF itab.
And modified the code as below:
DATA:
V_DMBTR TYPE DMBTR,
V_HWBAS TYPE HWBAS.
LOOP AT ITAB2.
V_DMBTR = V_DMBTR + ITAB2-DMBTR.
V_HWBAS = V_HWBAS + ITAB2-HWBAS.
AT END OF BELNR.
ITAB2-DMBTR = V_DMBTR.
ITAB2-HWBAS = V_HWBAS.
APPEND ITAB2 TO ITAB3.
CLEAR: ITAB2, V_DMBTR, V_HWBAS.
ENDAT.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZAK_FORM_C4'
is_layout = layout
it_fieldcat = it_fld_catalog
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = itab3 "itab2 --> Use ITAB3 instead of ITAB2
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
BR,
Suhas
Edited by: Suhas Saha on Jan 13, 2009 3:23 PM -
Credit master records are showing the wrong credit exposure?
Hi,
Some credit master records are showing the wrong credit exposure and therefore orders are being credit blocked when they should have been approved.
The problems occur after the credit limit has changed in the credit master record
Please Help.
Regards,
ChamandeepDear Chamandeep,
Trust you have reviewed the open documents that would constitute to credit exposure, and have turned a blank.
In such cases, it is possible to reorganise the credit master data of customers by using the programmes RVKRED77 and RVKRED07.
Kindly prefer the latter as it permits greater flexibility especially in selection of dates of data reorganisation.
In either case, the data re-organisation is resource intensive and is best run when all other users are cleared from the system.
Regards,
K Gopidas -
I have a multi room DVR in my livingroom and HD boxes in my 2 bedrooms. Currently if you are viewing a program on one of the HD boxes you are able to record the live program you are viewing as the HD box will enable your DVR to record that show.
Why hasn't FIOS enabled the settop boxes that are part of a multi room DVR setup to be able to record future shows? Needless to say, if I am lying in bed at night and see something in the program guide airing at a future date I really don't want to get out of bed and walk to the living room, turn on the TV and DVR and then program that new recording.
If I have missed something and you can do this please let me know. Otherwise FIOS should add this to their customer's wish list and enable recording for future times on the HD boxes that are part of your multi room DVR system!You can already do that. Highlight the show in the guide and press the record button. You should get a pop up with the option to Set Reminder or Record on your DVR. If it doesn't check your DVR to ensure that availability is extended to the STB you are using.
-
SSRS Matrix report to show or hide year column based on parameter value "Date" selected.
Hey experts!
I have a requirement an ssrs matrix report should display columns (year/s) based on parameter value (date/s).
My Dataset fileds are: Product, Year_name, Month_name, Date
Currently my report output looks like this-
Param Date: 2013-08-01 00:00:0.000
Product +Calender2011 +Calender2012 -Calender 2013........ +Calender2014
Total
Total Jan13 Feb 13 Mar13.. Dec13 Total Total
Abc 100
220
10 20 30....... 20 250 400
Xyz 110
200 50 80 40....... 30 450 600
My requirement: if I'm selecting Date parameter value as '2013-xx-xx' I should only able to see Year column 'Calender2013' and rest of the years should hide. Similarly If I'm selecting Date parameter value as '2014-xx-xx' I should only able to
see Year column 'Calender2014' .
Appreciate your kindly help.
AfanHi Afan,
According to your description, you want to only show the selected year on your report, right?
In this case, you need to get the year from the date parameter using the expression below
=Year(Parameters!Date.Value)
And then use the expression below to get the year from Year_Name field.
=Right(Fields!Year_Name.Value,4)
Then add a filter to the dataset to filter the data like below
Expression:=Year(Parameters!Date.Value)
Operator:=
Value:=Right(Fields!Year_Name.Value,4)
Reference
http://msdn.microsoft.com/en-IN/library/dd255287.aspx
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
TechNet Community Support -
Where is our DVR that can record 4+ shows at a time?
Comcast customers can record 4 shows at once while watching another on X1 with a single box.
Cox customers can record 6 shows at once on Contour with a single box.
TiVo customers can record 4 or 6 shows at once on Roamio with a single box.
But us FiOS customers can only record 2 shows at once, while watching something we've pre-recorded, with a single box.
Are there any plans to actually be competitive with these other providers in regards to recording ability?
TV - FiOS TV Extreme HD
Internet - FiOS Residential 25 Mbps/25 MbpsIts in alpha testing now expected to be finally released "soon".
Look for threads on VMS1100 and see http://newscenter.verizon.com/residential/news-articles/2013/01-verizon-motorola-fios-tv-media-serve... -
Show or Hide Items based on radio value
I am trying to show and hide various Items based on the values of a radio button item. I have see the code and examples like
function Show_On_Radio_Value(pThis, pThat, pValue){
var rv = html_RadioValue(pThis);
if (rv == pValue) {
html_ShowItemRow(pThat);
} else {
html_HideItemRow(pThat);
The problem I am having is that I have 3 different values of the radio item and I want to display certain items based on each different value.
For example:
radio_value = 'Yes'
Show Item1, Item3, Item4
or
radio_value = 'No'
Show Item2, Item5, Item6
or
radio_value = 'Maybe'
Show Item1, Item2, Item4
I am fairly new to this so it might be easy, I just don't know how.
Any help would be appreciated.
--DGArie,
Thanks for the reply. I have tried it using the Show_On_Radio_Value function but I still can't get it to do exactly what I want. I have a working version here http://apex.oracle.com/pls/otn/f?p=25290 ,
The code I used for this demo app is:
[script language="JavaScript1.1" type="text/javascript"]
<!-- Hide
function Show_On_Radio_Value(pThis, pThat, pValue){
var rv = html_RadioValue(pThis);
if (rv == pValue) {
html_ShowItemRow(pThat);
} else {
html_HideItemRow(pThat);
function Hide_On_Radio_Value(pThis, pThat, pValue){
var rv = html_RadioValue(pThis);
if (rv == pValue) {
html_HideItemRow(pThat);
} else {
html_ShowItemRow(pThat);
// End Hide -->
[script]
In the HTML Form Element Attribute for the radio button:
onchange="Show_On_Radio_Value('P1_RADIO','P1_TEXTAREA','Maybe');
Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD1','Maybe');
Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD2','Maybe');
Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD3','Maybe');
Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD4','Maybe');
Hide_On_Radio_Value('P1_RADIO','P1_RADIOBUTTON','Maybe');
Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD2','No');
Hide_On_Radio_Value('P1_RADIO','P1_TEXTFIELD4','No');
Hide_On_Radio_Value('P1_RADIO','P1_RADIOBUTTON','No');
The problem I see is that in the onchange event, the 'No' options are working because they appear last in the event.
Can you possibly provide an example using a Case statement?
Thanks,
DG -
While exporting the Report to Excel Records are showing two times
Hello Gurus
When im trying to export a report from NW Portal to Excel, data is showing double times, even variable selections screen, records are showing two tmes.
What would be the problem, does we need any SP.
Thanks in advance.
Regd
LajwanthGURU'S ANY REPLIES........
-
Creation of a new record based on the value of a picklist
Hi,
My requirement is whenever i select a picklist value in Opportunity record type based on the value selected a new opprtunity record should get created and get assigned to a role or A User otherwise a lead should get created and should be assigned to a Role or A User.
Can I achieve this in OnDemand?
Kindly help. This is urgent..
Thanks in Advance.Can I achieve this in OnDemand?I think you can better try one of the Oracle CRM On Demand forums @ http://forums.oracle.com/forums/category.jspa?categoryID=162
instead of the Oracle SQL and PL/SQL forum.
This is urgent..The forums are relying on volunteers and it is weekend for most of us now.
If it is really that urgent, call Oracle Support.
Maybe you are looking for
-
Problem loading images in adobe bridge html photo gallery
Can someone please, please help me!? I can not figure out why the images will not load in my adobe bridge html photo gallery cs5. I am not getting any error messages in Firefox and just the x in internet explorer. Here is the link to the gallery page
-
I've restarted my MacBook Pro (like I used to have to do with my PC) and I've of course also quit and restarted Contacts. What happens is, I select Contacts, like lets say from the Dock. It opens or comes to the foreground if it was already open. I c
-
Error Message - java.lang.LinkageError: loader constraint violation
Hi I get the following errormessage if I try to apply a more recent build of the JPA Toplink Essentials. If I use the glassfish-persistence-installer-v2-b45.jar all things work fine, but if a try to upgrade my program will fail. I tried the glassfish
-
Question 1: If I have a many to many relationship that I want to display within multiple tables. Is there a straightforward way to bind that? An example would be an automobile that use similar parts (seats etc). I dont think livecycle supports keys
-
Lion VPN with a Windows 7 client; can't browse network
So, here's my setup.. I have a Lion Server running VPN (192.168.1.11 /24), a windows box behind the VPN (192.168.1.15) and a Windows 7 client connecting. I've been able to get the Windows 7 client to actually connect to the VPN. I can also manually g