Conditional operator and nulltype
hi,
i have a little problem, it's actually not really a problem, im just curious. i have the following testclass
public class Test{
public static void main(String[] args) {
Double a = false? 1.00: (Double)null; // nullpointer (A)
Double b = false? 1.00: null; // works (B)
}when line (A) is uncommented a NullPointerException is thrown and i have no idea why.
when i comment out line (A), line (B) works. because the type of the conditional operator is of the other if one of them is NullType.
so not really a problem because it's better to use (B) but i still want to know why (A) doesn't work.
Edited by: creichlin on Oct 27, 2008 12:15 PM
ouch, i am just to stupid. i forgot autoboxing, the NullType is cast to a null Double, then it's autoboxed to a double and then to a Double again.
Similar Messages
-
What is the conditional operator for AND, OR .....?
what is the conditional operator for AND, OR .....? in ABAP language...
AND, OR .. & is not accepting or recognising.
Is these feature available in abap ??? if yes, how to use?
thanks...
shivaHi,
Conditional operator for AND and OR are same AND and OR.
A logical expression consists of comparisons (see expressions 1 to 4 below) and/or selection criteria checks (expression 5) using the operators AND, OR and NOT , as well as the parentheses " (" and ")".
The individual operators, parentheses, values and fields must be separated by blanks:
Incorrect:
f1 = f2 AND (f3 = f4).
Correct:
f1 = f2 AND ( f3 = f4 ).
NOT takes priority over AND, while AND in turn takes priority over OR:
NOT f1 = f2 OR f3 = f4 AND f5 = f6
thus corresponds to
( NOT ( f1 = f2 ) ) OR ( f3 = f4 AND f5 = f6 )
The selection criteria comparisons or checks are processed from left to right. If evaluation of a comparison or check proves part of an expression to be true or false, the remaining comparisons or checks in the expression are not performed.
All data objects that can be converted among each other can be used as operands for logical expressions.
Check if u are using the AND or OR operator this way.
IF f1 AND f2.
ENDIF.
In this case it will throw error. Here it act as relational operator.
Regards,
Prakash -
Powershell equivalent of a conditional operator?
Hi,
I've got a small snippet of Powershell code that works perfectly well, but I'd like to make it better. here it is:
if ($discoveredIssues.Length -gt 0){
$returnHash += @{"IsBatchValid"=$false}
else{
$returnHash += @{"IsBatchValid"=$true}
I don't like the fact that the string literal "IsBatchValid" exists in two places as there's always the chance that someone could change it one place and not the other (very minor quibble, I know).
I was wondering if there was a way to write this such that I don't have the if...then...else. I tried to do this:
$returnHash += @{"IsBatchValid"={if ($discoveredIssues.Length -gt 0){$false}else{$true}}}
but that doesn't work. It just returns "if ($discoveredIssues.Length -gt 0){$false}else{$true}}" rather than the actual result of that expression. I was hoping there might be something like C#'s conditional operator so that I could do something
like this:
$discoveredIssues.Length -gt 0 ? $false : $true
but sadly not.
Any ideas how I can achieve this? I suspect there isn't a way, but it'd be nice if there were.
thanks
Jamie$returnHash.IsBatchValid = $discoveredIssues.Length -gt 0
Oh nice. Didn't quite work. Powershell ISE complained:
But it prompted me to go away and change it to this:
$returnHash += @{"IsBatchValid"=$discoveredIssues.Length -eq 0}
which I suppose would have been obvious had I bothered to pay any attention to what I was doing. Always pays to have someone else put eyes on something. thanks mjolinor.
Glad to help.
It wasn't obvious from the code whether $returnHash already exists or not. I was assuming it did:
$returnHash = @{}
$returnHash.IsBatchValid = $discoveredIssues.Length -gt 0
$returnHash
Name Value
IsBatchValid False
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " " -
Conditional operator question?
Hello,
Quick question, are we not allowed to use the conditional operator this way... see code below:
char volatile ProgString_[] = "\
{Fan code} \
12 <Limit11> [C1_ACM2]_[B1] _AND_ \
bla bla \
unsigned char UPC_SYSZ_EndOfTable(unsigned long i){ // Find the double '*' in string
char volatile *u;
u = &ProgString_[i];
if(!(strncmp("*", u, 1))){
i++;
u = &ProgString_[i];
if(!(strncmp("*", u, 1))){
return TRUE;
else {
return FALSE;
else
return FALSE;
void UPC_SYSZ_Parse(){
unsigned char volatile iOCntr = 0;
unsigned long volatile i;
for(i=0; i<200; i++){
(UPC_SYSZ_EndOfTable(i))?(break):(continue); //<<<<< Invalid expression ??
I would of used the following compact line:
(UPC_SYSZ_EndOfTable(i))?(break):(continue); //<<<<< Invalid expression ??
to periodically test the end of the string by fetching the "EndOfTable() function and evaluating if the double star is detected.
If detected, I would break out of the for loop, if not then I would continue.
Is it possible to do it this way?
thanks for all help!
rThink of it along the lines of each of the operands of the ternary operator must produce a value (which of course break and continue being statements cannot do).
Based on your brief example here is what I would do
for(i=0; i<200; i++){
if (UPC_SYSZ_EndOfTable(i)) break;
// doesn't make any sense to put more code down here anyway, so no real point to continue} -
Alternative condition type and base value
hi
gurus i am very much confused with this
alternative condition type and base value plzz clear me from this confusion
give me with realtime example and tel me in simple way
they will fully rewarded. and also a gud help to me
thanks
srinivask.Hi
hope it is Alternative Calculation Type and Alternative Condition Base value
if so pls refer below
<b>Alternative Calculation Type:</b>
Normally if you want to calculate a value you have to use a calculation type for determination the value. This calculation type is either addition, subtraction or multiplication. Similarly SAP also has got a default calculation type in the control data of the condition type. There you have the options of either Qty based , Fixed Amount Based or Percentage based.
Here what happens is suppose if you define Your condition type that calculates the base price of a material on Qty based. Then the calculation will be done based on the quantity of the material. If the customer orders 10 Nos and you have maintained a unit price of 100 Rs for each material then the value determined is 1000 INR. Similarly if the discount condition type , you maintain the calculation type as %. This means if you maintain the value of 10 % in the condition record. Then this percentage is taken as the calculation type and the condition value is determined.
In some cases you have to forego the default calculation types and use the customer specific method for calculating a value. For ex if you are calculating the Freight charges for a Material . it depends on so many criteria like, the weight, volume and also the minimum amount etc etc, in those cases, you forego the default value and then use the alternative calculation type in calculating the condition value against the particular condition.
<b>
Alternative Condition Base value</b> :
If you have to calculate any value then you have to have a base value for it. For ex if you want to calculate the discount of 10 % for a material then you have to have a base value on which this 10% is calculated. Normally you take the condition value of the base price of the material to calculate the value.
Now you don't want to take the base value and take other values as base value which are derived on some formulae. So you create a routine which will do the mathematical operations in the routine and derive you a value which is now used as the base value for calculating the condition value for a particular condition type -
Conditional Operator for Popup Pages!!
Hi All,
In my application there are 2 two different pages say 85 and 45. In page 85 i am calling the Iframe in which it will redirect to page 45. Now in that page i.e 45 i have used template as popup. In that i have an IR and HTML regions and a button in IR region. when i click on button then only should show the HTMl Region for that i ahave used conditional operator. But that is not working!!
So i would like to know wheather conditional will work popup pages. If not let me know the procedure for that!!!!
Thanks,
Anoo.... Apart from that, there is no need for your original long list of "if .. else". For a list of possible inputs, you should consider something like this:
switch(myYear.selection.text)
case "10": yearSelect=0; break;
case "11": yearSelect=1; break;
case "12": yearSelect=2; break;
case "13": yearSelect=3; break;
case "14": yearSelect=4; break;
default: yearSelect=5;
or, with your input and output, something as simple as
yearSelect = Number(myYear.selection.text)-10;
-- but I don't know what your possible range of inputs is. If it's "anything goes", you have to check for a not-in-range and then set it to your default of 5. -
Conditional Operator for else if?
I used the google compiler on one of my scripts. It worked fine except I am getting hung up on some of the conditional statements it made. Originally I had a series of if else if statements. When changed to Conditional Operator it changes the fuctionality of it. Here we go if anyone can help I will take any tips.
My version:
if(myYear.selection.text=="10"){yearSelect=0;}
else if(myYear.selection.text=="11"){yearSelect=1;}
else if(myYear.selection.text=="12"){yearSelect=2;}
else if(myYear.selection.text=="13"){yearSelect=3;}
else if(myYear.selection.text=="14"){yearSelect=4;}
else{yearSelect=5;}
Google version:
yearSelect="10"==b.selection.text?0:"11"==b.selection.text?1:"12"==b.selection.text?2:"13"==b.selection.text?3:"14"==b.selection.text?4:5,
Thanks in advance for any advice.
Brett... Apart from that, there is no need for your original long list of "if .. else". For a list of possible inputs, you should consider something like this:
switch(myYear.selection.text)
case "10": yearSelect=0; break;
case "11": yearSelect=1; break;
case "12": yearSelect=2; break;
case "13": yearSelect=3; break;
case "14": yearSelect=4; break;
default: yearSelect=5;
or, with your input and output, something as simple as
yearSelect = Number(myYear.selection.text)-10;
-- but I don't know what your possible range of inputs is. If it's "anything goes", you have to check for a not-in-range and then set it to your default of 5. -
NEED HELP:To Parse Conditional Operator Within An Expression.
Hi there:
I'm having some difficulties to parse some conditoional operator. My requirements is:
Constants value: int a=1,b=2,c=3
Input/Given value: 2
conditional operator expression: d=a|b|c
Expected result: d=true
Summary: I like to receive a boolean from anys expressions defined, which check against Input/Given value.Note: The expression are various from time to time, based on user's setup, the method is smart enough to return boolean based on any expression.
Let me know if you have any concerns.
Thanks a million,
selenahere is a simple example.
BNF changes
EXPR ::= OPERATOR
EXPR ::= OPERATION OPERANT EXPR
This is as far as I can go, please use it as a template only
because you need to take into account the precedence using ()
the logic of the eval was simply right to left so I think it is not what you want
Cheers
public interface Expression
String OR = "|";
String AND = "&";
public boolean eval(int value) throws Exception;
public class ExpressionImpl implements Expression
public String oper1;
public String operant;
public Expression tail;
/* (non-Javadoc)
* @see parser.Expression#eval()
public boolean eval(int value) throws Exception
int val1 = getValue(oper1);
if (null == tail)
System.out.println(val1 + ":" + value);
return (val1 == value);
else
if (OR.equals(operant))
return (val1 == value || tail.eval(value));
else if (AND.equals(operant))
return (val1 == value && tail.eval(value));
else
throw new Exception("unsupported operant " + operant);
private int getValue(String operator) throws Exception
Integer temp = ((Integer)Parser.symbol_table.get(operator));
if (null == temp)
throw new Exception("symbol not found " + operator);
return temp.intValue();
public String toString()
if (null == operant) return oper1;
return oper1 + operant + tail.toString();
public class Parser
public static HashMap symbol_table = new HashMap();
* recursive parsing
public Expression parse(String s)
ExpressionImpl e = new ExpressionImpl();
e.oper1 = String.valueOf(s.charAt(0));
if (s.length() == 1)
return e;
else if (s.length() > 2)
e.operant = String.valueOf(s.charAt(1));
e.tail = parse(s.substring(2));
else
throw new IllegalArgumentException("invalid input " + s);
return e;
public static void main(String[] args) throws Exception
Parser p = new Parser();
Parser.symbol_table.put("a", new Integer(1));
Parser.symbol_table.put("b", new Integer(2));
Parser.symbol_table.put("c", new Integer(3));
Parser.symbol_table.put("d", new Integer(4));
Expression e = p.parse("a|b|c&d");
System.out.println("input " + e.toString());
System.out.println(e.eval(2));
} -
OIM: How to get the last operation and data from a child form action
Dear OIM guru,
I have a regular Process form, a child form and a process definition. When there is an insert/delete into child form a trigger is raised and the process task gets called. The process task does whatever it needs to do on the target system. This is all fine. However, after the task completes, lets say successfully, I want to send out an email to the user saying, for example, group 1 has been added to you or just got deleted.
I am not able to figure out how to get that last operation and child form data. I am sure you came across this and if so please let me know how to do this.
ThanksSo, Can I add a similar process task with the same exact condition one more time? I thought I couldn't use the same condition again. For example, when a group is deleted can I use the process data->child data->group Id with old value check box checked on another process task?
-
Hello All,
Is there any Data Mapping document Between S&OP ( model that uses supply planning operator ) and SAP ECC that I will help in Data Mapping activity.
Thanks,
MowneshThere are standard templates in HCI data sources.
e.g. 1) Customer Master data template is SOP_MD_CustomerMaster for extracting master data from SAP ECC and load it to S&OP
KNVP is the table for customer in ECC from that you can select the fields as required
KUNNR for customer Number
ADRNR for Address
List of a few commonly used table names of ECC:
Product Related:
MARA – Material Master (MATNR)
MARC – Material Master with Plant Data (MATNR, WERKS)
MARD – Material Master with Storage Location Data (MATNR, LGORT, WERKS)
MAKT – Material Master Material Descriptions (MATNR, MATKL)
MBEW – Material Valuation Data (MATNR, BWTAR)
MVKE – Material Master : Sales related Data
MDKP, MDTB – MRP related Data( Header, Item)
MCHA, MCHB – Material Batches (Header, Item) (MATNR, WERKS, LGORT, CHARG)
Vendor/Supplier related:
LFA1 – vendor data (LIFNR)
LFB1 -- Company Code Segment : Vendor Data(LIFNR, BUKRS)
LFC1 -- FI Related Vendor Data (LIFNR, BELNR)
LFM1 – Pur. Orgn. Related Vendor Data (LIFNR, EKORG)
PReq/PO, BOM Related:
EBAN – Pur. Req. Data( BANFN, BNFPO, BADAT, MATNR)
EINA – Purchase Info. Record(General Data)(INFNR, MATNR, LIFNR)
EINE – Purchase Info. Record (pur. Orgn. Data) (INFNR, EKORG)
ELBK, ELBN, ELBP – Vendor Evaluation Related Data
EKKO – PO Data (Header) (EBELN, BSTYP, BSART)
EKPO – PO Data (Item) (EBELN, EBELP, MATNR)
Pur. Req., RFQ and PO are differentiated by Doc Type (BSTYP) in EKKO table.
For RFQ it is ‘A’ and for PO it is ‘F’
MKPF – GRN Data (Header) (EBELN, BLDAT, BUDAT, XBLNR, BKTXT)
MSEG – GRN Data(Item) MBLNR, BWART, LIFNR, MATNR, EBELN)
Apart from this there are lot of tables which begin with ‘M’ & ‘E’, but we
use the following very often.
EQUK – Quota (Header)(QUNUM, MATNR)
EQUP – Quota (Item) (QUNUM, QUPOS, LIFNR)
EKBE – PO History Data (EBELN, EBELP, BELNR, BLDAT, MATNR, VGABE)
EKBZ – PO History with Delivery Costs(EBELN, BELNR, LIFNR, XBLNR)
EKET – Schedule lines data of a PO(EBELN, EINDT, SLFDT)
EKES – Vendor Confirmations Data (EBELN, EBTYP, EINDT, XBLNR)
T163F – Confirmation Texts (EBTYP, EBTXT)
T156 – Movement Types (BWARE)
T024 – Purchasing Groups
T024E – Purchase Organizations
T163 – Item Category’s in Purchasing Documents(PSTYP)
T149D – Valuation Types
T134 – Material Types
FVLK – Delivery Types
STKO, STPO – BOM(Bill Of Material) related Data (Header & Item)
STPU, STPN, STST, STZU – BOM Related Tables
RKPF, RBKP, RSEG (Header & Item) – MM – FI Related Data
KONO, KONH – Pricing data
T006 – Basic Unit Of Measurements
Customer/Sales Order Related:
VBAK : Sales Document(Header Data) (VBELN)
VBAP : Sales Document(Item Data) (VBELN, POSNR, MATNR, ARKTX, CHARG)
Enquiry, Quotation, Sales Order are differentiated based on Doc.
Type(VBTYP Field) in VBAK, VBAP Tables for Enquiry VBTYP = A, for Quotation ‘B’ & for Order it is ‘C’.)
LIKP : Delivery Table(Header Data) (VBELN, LFART, KUNNR, WADAT, INCOL)
LIPS : Delivery Table(Item Data)(VBELN, POSNR, WERKS, LGORT, MATNR, VGBEL)
(LIPS – VBGELN = VBAK- VBELN, LIPS-VGPOS = VBAP-POSNR)
VTTK : Shipment Table(Header Data) (TKNUM)
VTTP : Shipment Table (Item Data)(TKNUM, TPNUM, VBELN)
(VTTP – VBELN = LIKP – VBELN)
VBRK : Billing Table(Header Data) (VBELN, FKART, BELNF)
VBRP : Billing Table(Item Data) (VBELN, POSNR, FKIMG, NEWR, VGBEL, VGPOS)
(VERP – AUBEL = VBAK- VBELN, VBRP – VBEL = LIKP – VBELN)
Apart from these tables there are lot of other tables which starts with ‘V’, but we use the
following tables frequently.
VBUK: All Sales Documents status & Admn. Data(Header) (VBELN, VBTYP)
VBTYP = ‘C’ (Sales Order) VBTYP = ‘L’(Delivery) VBTYP = ‘M’(Invoice)
VBUP: Sales Documents status & Admin. Data(Item) (VBELN, POSNR)
VBEP : Sales Document Schedule Lines Data (VBELN, POSNR, EDATU, WMENG)
VBKD: To get sales related Business data like Payment terms etc.(VBELN, ZTERM)
VBFA: Sales Document flow data(VBELV, VBELN, POSNV, VBTYP)
VBPA: Partner functions Data(VBELN, PARVW, KUNNR, LIFNR)
TVLKT: Delivery Type: Texts(LFART, VTEXT)
KNA1, KNB1, KNC1 : Customer Master Data and Other Partner’s Data(KUNNR,
NAME1,LAND1)
KNVK: Customer Master Contact Person(PARNR, KUNNR)
KNVV: Customer Master Sales Data.
LFA1, LFB1, LFC1: Vendor Master Data(To get Transporter data)(LIFNR, NAME1, ORT01)
MARA, MARC, MARD : Material Master Data(Basic, Plant, St. Location Views)
TVKO: Sales Organizations(VKORG)
TVKOV: Distribution Channels(VTWEG)
TVTA: Divisions(SPART)
TVKBZ: Sales Office(VKBUR)
TVBVK: Sales Group(VKGRP)
T077D: Customer Account Group(KTOKD)
T001W: Plants(WERKS)
T001L: Storage Locations(LGORT)
TWLAD: To get address of Storage Location and Plant(LGORT, ADRNR)
TVAU: Sales Document (Order) Types
KONV: Condition Types (pricing) (KNUMV, KSCHL, KWETR)
T685T: Condition Types Texts.
ADRC: To get Addresses of Partners
VBBE, VBBS: Sales Requirements Data
VBKA: Sales Activities Data
VBPV: Sales Document Product Proposal
Based on the functionality you can search ECC table names and fields
Hope this information is helpful for you.
Thanks and Regards,
Anjali -
Chart report Condition fields and Data fields
Hi all,
i have tried chart report by adding two condion fields and one data field, the report is more meaning full in this scenario. the first condition field is taken as x-axis, the 2nd condition fields is taken as legend.
while adding more condition fields and data fields, i feel its not showing meaningfull data.
can anyone explain how the condition fields and data fileds are manipulated by crystal report.
i am using CR XI R2 Server.
Thanks
Padmanaban Vi am using Crystal Report XI R2 RAS Embedded in my server.
as we can add any number condition fields programatically using the method
ConditionField.Add(FieldObj), i would like to know how these fields are manipulated internally by the RAS server.
that means, what is the significance of condition fieldobject 1, condition fieldobject 2,condition fieldobject 3 etc...
if i add more than two condition fields , RAS Chart Report always returns 0 as legend value for all legends.
Thanks in advance
Regards,
Padmanaban V
Edited by: Padmanaban Viswanathan on Dec 22, 2008 9:53 AM -
Swf link not working in Firefox, Opera and Internet Explorer but works in Safari
Hi,
I'm sorry but Im a real newbie and really need help!!!
On the homepage of my website I have put a swf file that I linked to another page in my website through the div a href link and it displays great on safari and links, however in other browsers, when i try to click on it, it comes up with the link at the bottom of the browser (where it sometimes says Done), however it doesnt actually link, it jsut stays on the homepage.
Here is the coding i put in:
<div id="products2">
<p>
<a href="Our_brands/index.html">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','449','height','449','title','Products','src','Productions/boxes3','quality','high','p luginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwav eFlash','movie','Productions/boxes3' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="449" height="449" title="Products">
<param name="movie" value="Our_brands/boxesnew.swf" />
<param name="quality" value="high" /><param name="SCALE" value="noborder" />
<param name="allowScriptAccess" value="always"/>
<embed src="Our_brands/boxesnew.swf" width="449" height="449" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" allowScriptAccess="always" scale="noborder"></embed>
<br />
<br />
</object>
</noscript>
</a>
</p>
</div>
Could someone please tell me where I am going wrong?
I would REALLY appreciate it.
Thank you in advance!!I'm doing it for a client and they dont want it put up on the server yet, I wish I could put it up bc I have no idea what I'm doing!
Basically I wanted a swf file from Flash to display a range of products (I have turned all the products into buttons) and then I put coding into all the buttons to on release getURL which work in the swf file, however when I put the swf file into dreamweaver, the buttons worked in hover state, but the action scripting didn't work to link the swf file to another page in the website (the index in Our_brands folder).
So i decided to make it link to the index.html in Our_brands folder from wrapping the swf box in a div tag and linking the div tag <a href="Our_brands/index.html"> which links it great in Safari but wont link in Firefox, Opera and Internet Explorer.
Does that make any sense?
Sorry if it doesn't.
Thanks for the quick reply as well!!! -
My web site is generated by Second Site , author John Cardinal, and contains email links which when selected automatically createsan email which all you need to do is fill in the body and send it. This has worked in the past in Firefox and does work now using IE 8, Opera, and Netscape browsers but does not work when using my Firefox browser neither locally on my computer or in my Internet website. Firefox is my browser of choice. This has worked in the past using Firefox.
My web site is www.schulteis.com/omnibus/. On the presentation page, on the bottom, where it identifies Genealogist: Site Administrator. Select it and it may work for you. John Cardinal tested it on his local machine and it worked for him. His response to me was,
"It's very likely that this is some sort of browser configuration error, and it's probably related to using a web-based email client, In
Firefox, look under Options > Applications and see how the "Mailto" Content type is configured. It should probably say "Use Yahoo Mail" [it does]. I have never configured a browser to use a web-base email client, so I can't help more than that.
Since this works fine on my computer and on my Internet site when using browsers IE 8, Opera, and Netscape but not Firefox, and I didn't do anything special for any browser to cause it to work, don't know what I could have done wrong for Firefox.
I am using Yahoo mail.
Thanks for your help
Donald
[email protected]I'm also running FF 36.0.4 on a Win 7 machine. Here is what I see when I "open" the map (from the server - not inside DW):
The map area stays white with no image even after several minutes. The cursor does change to a hand when over the area where the map should be and if I click and drag there the cursor switches to the closed hand - so it's acting like the map is there and can be moved - but just no map shows up.
I'll run it though the validator. Thanks! -
SQL Query (updateable report) Region - Conditionally Hide and Set Values
SQL Query (updateable report) Region - Conditionally Hide and Set Values
Outline of requirement :-
Master / Detail page with Detail updated on same page using SQL Query (updateable report).
The detail region has the following source
SELECT item_id,
contract_id,
CASE WHEN hardware_id IS NOT NULL THEN
'HA'
WHEN backup_dev_id IS NOT NULL THEN
'BD'
WHEN hardware_os_id IS NOT NULL THEN
'HS'
END item_type,
hardware_id,
backup_dev_id,
hardware_os_id
FROM "#OWNER#".support_items
WHERE contract_id = :P26_CONTRACT_IDThe table support_items implements arced relationships and has the following columns
CREATE TABLE SUPPORT_ITEMS
ITEM_ID NUMBER NOT NULL,
CONTRACT_ID NUMBER NOT NULL,
HARDWARE_ID NUMBER,
BACKUP_DEV_ID NUMBER,
HARDWARE_OS_ID NUMBER
)A check type constaint on support_items ensures that only one of the fk's is present.
( hardware_id IS NOT NULL
AND backup_dev_id IS NULL
AND hardware_os_id IS NULL
OR ( hardware_id IS NULL
AND backup_dev_id IS NOT NULL
AND hardware_os_id IS NULL
OR ( hardware_id IS NULL
AND backup_dev_id IS NULL
AND hardware_os_id IS NOT NULL
) Hardware_Id is a FK to Hardware_Assets
Backup_dev_id is a FK to Backup_Devices
Hardware_os_id is a FK to Hardware_op_systems
The Tabular Form Element based on item_type column of SQL query is Displayed As Select List (based on LOV) referencing a named list of values which have the following properties
Display Value Return Value
Hardware Asset HA
Backup Device BD
Computer System HSThe Tabular Form Elements for the report attributes for hardware_id, backup_dev_id and hardware_os_id are all Displayed As Select List (Based on LOV).
What I want to do is only display the Select List for the FK depending on the value of the Select List on Item Type, e.g.
Item_Type is 'HA' then display Select List for hardware_id, do not display and set to NULL the Select Lists for backup_dev_id and hardware_os_id.
Item_Type is 'BB' then display Select List for backup_dev_id, do not display and set to NULL the Select Lists for hardware_id and hardware_os_id.
Item_Type is 'HS' then display Select List for hardware_os_id, do not display and set to NULL the Select Lists backup_dev_id and hardware_id.
There are properties on elements to conditionally display it but how do we reference the values of the SQL query Updateable region? they are not given a page item name?
Also on the Tabular For Elements there is an Edit tick against a report item - however when you go to the Column Attributes there is not a property with which you can control the Edit setting.
What's the best way of implementing this requirement in APEX 3.1?
Thanks.>
Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far... -
Standard Report with Condition Type and Condition Records
Hello to all,
Is there any standard report available in which Condition Type and Condition values are displayed in either column or row format? The selection criteria can be either Quotation, Contract, Sales Order, Delivery, Invoice or Billing. Thanks anyways...Hi Huzefa,
Pls check the relevant table where the condition records are stored. then do a query with that condition table and KONP. say for eg: condn type ZINV,ZMRP gets stored in condition table A821, then combine A821 and KONP, u can input condition type and get the values........................
go to vk13, display and click on layout, u will able to see the condition table.
Rgds,
Anitha J
Maybe you are looking for
-
Link for jumping from a JSP Appl. with a button to an external Web-Side
Hi, I'm searching for the solution to create a button where I can jump to an external Web-Side! What I have to do for that in JSF???? Regards Ingo
-
Read timed out error in IOP Ver 11.1.2.0
Hi, This is an error we encountered during one of IOP testing for a project. Wondering if someone can help us understand the real issue. Any help is appreciated. User is using the Analysis Workbench, He has created a scenario, and in one of the cubes
-
Hi: Sorry if asked before. In every folder I open in finder, I see all the hidden files, either for a drive or for an individual folder. In individual data folders, there is always a .DS_Store for example. Somehow I must have triggered something to d
-
SAP-BO SSO and Row Level Security
Hi, We can configure the SAP authentication and able to login InfoView via SAP user name and password. And also, we can import the roles from the SAP system. When we create a connection to BW cubes from designer, we want to use "Use Single Sign On wh
-
CF9 Service not starting - error parsing boolean property notifyclientonalert
Hi, I clean installed CF9 (after uninstalling CF8) on win2003 32bit and all was workign fine, however after a server restart the CF9 Application service refuses to start automatically or manually. I am getting an error in windows event logs saying se