"Lock constant value"
Hi,
I have a diagram with many boolean constants in it, which values are
critical. In this case, LabVIEW feature to easily change a boolean
constant value by a simple mouse click is a dangerous source of errors.
Is there a way to "Lock constant value" in LabVIEW ?
Is there any other handy way to shortcut this problem ?
[email protected]
Hi,
if you absolutely have to have a difficult to edit item, the best way is to make it a control, set off to either one side of the panel where it cannot be seen when the software is running, or set it to invisible.
Another option (again requireing the front panel) is to put down a numeric, and set it's data range Max and Min to the same, and put the increment to 0.0. - that way when you do need to change it, you can by going back in and editing the data range, but it's no longer a simple case of clicking on the item. It's a simple matter to take a 0 / 1 and turn it into a boolean (compare it to a 0 / 1!)
Another, more complicated way, is to use the configuration .vi's to load in the constants from a .ini file.
You could also put a free label with a transp
arent background over the top of the constant. (easiest) Makes it more obvious what the constant is for, and stops the designer having the ability to directly click on it.
Finally (and not recommended) is to use a PI constant, and another constant to represent the boolean (again comparing to get the True/False. The reason I don't recommend this is the block diagram can become confusing - why use a PI constant is bound to be asked by the first person to look at it!
I agree, lock constant value would be a nice feature for a future version of LV though.
Hope that helps
S.
// it takes almost no time to rate an answer
Similar Messages
-
Custom: use constant value in relationship between objects?
I have two related classes:
* Class A uses application identity, and has multiple PK fields, PK1 and
PK2.
* Class B has a 1-many relationship with class A. However, class B's
database table only has a column that relates to Class A's PK2 column.
(the PK1 value is a constant) for all Class B objects).
I have no idea how to express this relationship via kodo. Can anyone
assist?What I've chosen to do is add a new DB column to my table which has a
constant value (ie: is the same for every row). Then I can join with it.
I'd request this simple feature to be added in a future release: the
ability to specify a literarl constant value as part of the join
criteria in the metadata. It could be very easily added: instead of
specifying a column containing the join value, you could put the literal
into the .jdo file.
thanks.
Patrick Linskey wrote:
You could put together a custom field mapping that performed the join
like you described if you really wanted to. Bear in mind, however, that
the field mapping APIs are subject to change etc. etc. etc.
-Patrick
On Tue, 20 May 2003 22:25:16 -0400, David Michaels wrote:
Thanks for the quick reply, as usual Abe.
In this case, I will link to the full PK of the related object, just one
of the components of that PK is a constant. There's no place to
override the SQL used for these sort of joins?
Perhaps I can do this with a view too.
Abe White wrote:
It's not possible to create a Kodo relation that doesn't actually link
to the (full) primary key of the related object. Note that in general,
that kind of database design is not a good idea, because there's no
guarantee you're linking to a unique object.
You can use a Kodo query to get the related objects; you could hide the
query behind your getter method. -
How to Assign a Constant Value to a Dim. Member when pulling Master Data?
BPC Gurus:
I am trying load Vendor and Customer Master data into BPC dimension. My Dimesnion has memebrs: ID, EVDESCRIPTION, PARENTH1, TYPE. I have successfully pulled the ID and the description from 0CUSTOMER and 0VENDOR. However, I
need to have a ttext value for 'PARENTH1' and 'TYPE'. For Customers, I want to add a FIXED value "'CUSTOMER' for every
Customer ID pulled in and also for "TYPE", I want a value of "CUSTOMER". When I maintainthe Dimension, I want to see
th followingvalues:
ID EVDESCRIPTION PARENTH1 TYPE
0000000001 WALMART CUSTOMER CUSTOMER
0000000002 TARGET CUSTOMER CUSTOMER
and so ON
Since we have Vendor Numbers in the same Diemsnion, when I pull Vendors, I need to have similar values as:
ID EVDESCRIPTION PARENTH1 TYPE
0000005050 ABC Supply Inc. VENDOR VENDOR
0000005051 BASF VENDOR VEDOR
and so ON
How can assign a Fixed value to the member Propert? Can I achieve it in Conversion file....?
( My atempts failed...).
Any suggestion recommendation would be gretaly appreciated.
Munna.Hi,
For adding fixed values to the properties, you can use the transformation file. In the mapping section, you can specify a constant value. This value will be written to properties of all the members while importing master data. However, for parenth, its a bit different. First thing is that, you need to have a member called CUSTOMER, then only you can have CUSTOMER in the parenth column. Even if you add it and use the mapping section for this purpose, then it will write CUSTOMER to parenth for all the members (even to CUSTOMER member). And this will be wrong. So, you will need to write it manually.
Hope you got the idea. -
Assigning a Constant Value for Target Revenue
Hello all,
I have a scenario where I need to assign a Constant value, say 10000, for my Target revenue Key Figure at the Info Cube level. This value should always be 10000. Please advice.
Your valuable suggestions will be greatly appreciated. I will be assigning points as a way of expressing thanks.
Best Regards,
Deepthi.HI Deepti,
Today I faced same issue and I read your thread.
I saw the responses given by others and I feel its a shallow solution hardcoding the key figure to a constant value..because key figure is meant to change.
I solved it by altering the Aggregation level in an key figure infoobject.
The Aggregation must read MIN..Exception aggregation may be SUM..
and the characteristic on which aggregation must the infoobject that determines the unique value of the Infoobject..eg GJAHR/MONAT from R/3.
This will give the result as (where Target is the non-aggregated Key figure)
Plant Year Target Document No Production value
110 2004 1000000 1 10
110 2005 2000000 20 20
110 2004 1000000 2 15.
200 2005 40000 100 50
110 2005 2000000 21 23
The target value here depends only on Plant and Year..and stays constant for the unique combination of the 2.
U dont need to change the BEx status of any key figure..
I know the forum post I am putting is of no use..but someday someone who needs an answer urgently please do read this. -
Can a characteristic be made a constant value in the transformation
Hi
Therer is a req where i am picking 3 kf from 3 diff tables and out of that 2 tables have documnet type and one table doesnt have that..so now when i am running the query on that the kf which dint have a document type characteristic is not able to pull in the relevent data and it showing only '0' but the other 2 kf which had the document type characteristic is able to pull in the relevant data..
but the user wants to drill down the report using the document trype..is there any way in making a constant value to pop up automatically in that table..so that it can pick up and that particular table has only one document type.
Please suggest me with a solution
Regards
ShilpaHey Shilpa,
You can assign some constant value in your transformations for the docuemnt type coming from the first table (hope you have diff transformations for both). This way your kf will be accompanied with doc type and will show in query output.
Hope it helps...
Regards,
Ashish -
How to create a matrix with constant values and multiply it with the output of adc
How to create a matrix with constant values and multiply it with the output of adc
nitinkajay wrote:
How to create a matrix with constant values and multiply it with the output of adc
Place array constant on diagram, drag a double to it, r-click "add dimension". There, a constant 2D double array, a matrix.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
How could I replace hard coded value in my sql query with constant value?
Hi all,
Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
PROCEDURE class_by_day_get_bin_data
in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER
IS
bin_period_length NUMBER(6,0);
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
JOIN bin_types
ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = 2
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set
ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value
ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE'
) report_lanes
ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS'
) report_classes
ON bin_data_value.bin_id = report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table
ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = 2
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
bin_data.bin_type = 2But I dont want any hard coded number or string in the query.
How could I replace it?
I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
bin_type CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
Thanks.
Edited by: user10641405 on May 29, 2009 1:38 PMDeclare the constant inside the procedure.
PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER) IS
bin_period_length NUMBER(6, 0);
v_bin_type CONSTANT NUMBER := 2;
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
INSERT INTO edr_class_by_day_bin_data
(site_id,
site_lane_id,
site_direction_id,
site_direction_name,
bin_start_date_time,
bin_end_date_time,
bin_id,
bin_value)
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane =
site_to_data_source_lane_v.data_source_lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
report_lanes.lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data; -
Please help!!! This expression must have a constant value
I try to work with cfc and cfinvoke and not sure why I got this error. Searched
in google for answer but still don't get any. Can anyone help please...not sure where
I had it wrong...I thought my codes should work (?)
When a form is submitted I have this codes in formaction.cfm, I captured all the form fields in a structure:
<CFSET st_Registration = {Salutation="#Trim(Form.Salutation)#", FName = "#Trim(Form.FName)#", MName = "#Trim(Form.Mname)#",LName = "#Trim(Form.LName)#" .......etc }/>
Then I set all the required fields:
<CFSET ReqFields ="Salutation,FName,LName,Addr1,City,State,Zip,Country,Phone,Email,username,password">
<!--- Then send the structure and req. fiels list to a function located in a component to verify required fields ---><cfset CreateUserInfo = createObject("component", "airbucks.cfcomp.VerifyInput").init()>
<CFINVOKE component="#CreateUserInfo#" method="Verify_ReqFields" st_Registration = "#st_Registration#" RequiredFields ="#ReqFields#" returnvariable="VerifyResult">
<CFIF #VerifyResult# IS "">
<cfdump var="#st_Registration#">
<CFELSE>
<CFIF #st_Registration["Country"]# IS "USA">
<CFINCLUDE template="registration_ret.cfm">
<CFELSE>
<CFINCLUDE template="registration_other_ret.cfm">
</CFIF>
</CFIF>
<!--- Below is part of the component with the function for checking required fields --->
<cfcomponent displayname="VerifyInputData" output="false"> <CFFUNCTION name="Init" access="public" returntype="any" output="false" hint="Returns an initialized component instance.">
<!--- Return This reference. --->
<cfreturn THIS />
</CFFUNCTION>
<!--- Verify required fields --->
<CFFUNCTION name="Verify_ReqFields">
<cfargument name="st_Registration" type="struct" required="true">
<cfargument name="RequiredFields" type="string" required="true">
<!--- check if req. fields are blank --->
<CFSET ErrorList = "">
<cfloop collection="#arguments.st_Registration#" item="KEY">
<CFIF #Trim(st_Registration[KEY])# IS "">
<CFSWITCH expression="#Trim(KEY)#">
<CFCASE value="#arguments.RequiredFields#">
<CFSET ErrorList = ListAppend(ErrorList, "#KEY#")>
</CFCASE>
</CFSWITCH>
</CFIF>
</cfloop>
<CFRETURN ErrorList >
</CFFUNCTION>
</cfcomponent>
Here is the error:
The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
This expression must have a constant value.
The error occurred in C:\Inetpub\wwwroot\AirBucks\registrationaction.cfm: line 55
53 :
54 : <!--- Verify required field based on the required list set above --->
55 : <cfset CreateUserInfo = createObject("component", "airbucks.cfcomp.VerifyInput").init()>
56 : <CFINVOKE component="#CreateUserInfo#" method="Verify_ReqFields" st_Registration = "#st_Registration#" RequiredFields ="#ReqFields#" returnvariable="VerifyResult">
57 :Thank you and I'll change my codes.
When I did the following, I still get the same error.
Isn't it CreateUserInfo is the object?
<cfset CreateUserInfo = createObject("component", "airbucks.cfcomp.VerifyInput").init()>
<CFSET VerifyResult = CreateUserInfo.Verify_ReqFields(st_Registration, ReqFields)>
Using cfinvoke used to work.
The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
This expression must have a constant value.
The error occurred in C:\Inetpub\wwwroot\AirBucks\registrationaction.cfm: line 54
52 : <!--- Verify required field based on the required list set above --->
53 :
54 : <cfset CreateUserInfo = createObject("component", "airbucks.cfcomp.VerifyInput").init()>
55 : <!---
56 : <CFINVOKE component="#CreateUserInfo#" method="Verify_ReqFields" st_Registration -
Timestamp data type on S[range C on E] constant value-based range windows
Hello,
My questiong is about how can we use timestamp value on S[range C on E] constant value-based range windows.
I have a LotEvent which i should collect and sum lastQty data for last ten minutes of market time (sendDate)
A normal [range 600] query does not work for me because i would like to use the exact time which data has been generated by the market (sendDate).
Here is the event;
public class LotEvent{
private Double totalQty;
private float lastQty;
private String symbol;
private String messageType;
private Integer dataInterval;
private String sendDate;
send date is always in "MM-dd-yyyy HH:mm:ss" format.
I have tried to use the following query but this gives an error;
Invalid statement: "select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
+from lotInputChannel [range INTERVAL "0 0:0:15.0" DAY TO SECOND on >>sendDate<<]+
group by symbol"
Cause: Datatype char is not valid for value based windows
Action: Use a valid datatype for value based windows>
Here is the CQL;
<?xml version="1.0" encoding="UTF-8"?>
<wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application">
<processor>
<name>lotProcTenMin</name>
<rules>
<query id="tenMin"> <![CDATA[select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
from lotInputChannel [range INTERVAL "0 00:10:00.0" DAY TO SECOND on sendDate]
group by symbol]]> </query>
</rules>
</processor>
</wlevs:config>
i have tried this cql after changing the sendDate data type to long which is the time in milliseconds value but it did not work.
select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
from lotInputChannel [range INTERVAL "0 00:10:00.0" DAY TO SECOND on to_timestamp(sendDate)]
group by symbol
The query above does not work also when sendDate is a String in "MM-dd-yyyy HH:mm:ss" format
At last i tried the following query with sendDate as time in milliseconds (long) value. It works! but i still would like to know how to use timestamp in S[range C on E] queries
select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
from lotInputChannel [range *600000* on sendDate]
group by symbol
public class LotEvent{
private Double totalQty;
private float lastQty;
private String symbol;
private String messageType;
private Integer dataInterval;
private long sendDate;
Could anybody please help me with this issue?
Edited by: user8830791 on 01-Aug-2011 06:39It seems that you should configure the channel "lotInputChannel" as an application timestamped channel.
You can do that as follows -
- Have "sendDate" as a long and let its unit be milliseconds
- Use the following child elements of <channel> for the "lotInputChannel"
<wlevs:application-timestamped is-total-order="true">
<wlevs:expression>sendDate*1000*1000</wlevs:expression>
</wlevs:application-timestamped>
The multiplication by 10^6 is required since the units need to be converted into nanos
With this, you could use the query -
select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
from lotInputChannel [range 10 minutes]
group by symbol
Of course, for the above to work, a requirement is that the value of "sendDate" is non-decreasing.
That is if e1 is before e2 in the "lotInputChannel" then e1.sendDate <= e2.sendDate
Edited by: Anand Srinivasan on Aug 2, 2011 6:57 AM -
Outer join With a constant value
Hi all,
In one of query i have found out that the outer join with a constant value like
to_currency(+)='USD'
to_currency is a column name in a table.can any one please explain this outer join condtn.
Thanks in advance
SenthilHallo,
if you write var (+) = constant
var can be equal constant, and also can be null
Compare these 2 queries
select e.* from scott.emp e, scott.dept d
where e.deptno = d.deptno(+)
and d.deptno(+) = 10EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-Dez-1980 800 20
7499 ALLEN SALESMAN 7698 20-Feb-1981 1600 300 30
7521 WARD SALESMAN 7698 22-Feb-1981 1250 500 30
7566 JONES MANAGER 7839 2-Apr-1981 2975 20
7654 MARTIN SALESMAN 7698 28-Sep-1981 1250 1400 30
7698 BLAKE MANAGER 7839 1-Mai-1981 2850 30
7782 CLARK MANAGER 7839 9-Jun-1981 2450 10
7788 SCOTT ANALYST 7566 19-Apr-1987 3000 20
7839 KING PRESIDENT 17-Nov-1981 5000 10
7844 TURNER SALESMAN 7698 8-Sep-1981 1500 0 30
7876 ADAMS CLERK 7788 23-Mai-1987 1100 20
7900 JAMES CLERK 7698 3-Dez-1981 950 30
7902 FORD ANALYST 7566 3-Dez-1981 3000 20
7934 MILLER CLERK 7782 23-Jan-1982 1300 10
select e.* from scott.emp e, scott.dept d
where e.deptno = d.deptno(+)
and d.deptno = 10 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 9-Jun-1981 2450 10
7839 KING PRESIDENT 17-Nov-1981 5000 10
7934 MILLER CLERK 7782 23-Jan-1982 1300 10
As you can see, this (+) is very important
Regards
Dmytro -
Capturing constant value data entered at query filter
Hi,
I have two tables one is Customertab and other
is Customerver.
Customertab has two columns customerid and customer address
customerver has two columns customerid and customer version
For example in customer version table Customerid 100 has 2 versions 1 and 2
customerid 200 has 3 versions 1,2 and 3
customerid 300 has 4 versions 1,2,3 and 4
when ever iam developing the report in query panel filter the first
condition i select is customer id=100 and in the second filter condition i
am giving condition as verid= and select the version from LOVS. but if i
select the lovs iam seeing all versions.
My requirement is like as i have selected 100 in the first
filtercondition i have to see only 2 versions 1 and 2 in LOVS when
selecting the
2nd condition.
i dont want to use prompts. So can you please let me know is there any
possibility to capture the 100 some where and use the condition to restrict
the LOV's in the next filter conditionHi,
I dont want to create the prompts.But in Cascading prompts i need to create the prompts right.
My requirement is like as part of the report i have condition with customer_id=100 where 100 is the constant value and its not a prompt. So now in the next filter condition i have the prompt for selecting the versions. at the time of selecting the LOV for version then i need to consider the versions only for customerid 100 and display the available versions for the particular customerid 100. -
Constant value in one field in the Bex Report
Hi,
I want to have a field where the value of it constant irrespective of corresponding fields values.
Please suggest and let me know how to do it.
Regards,
PremHi,
If you have any logic in your mind to populate that extra char or key figure , then you can make use of virtual char & virtual keyfigure .
Or if you want to just pass any constant value, then in CKF make a formula variable with user entry . What ever user enters in the selection screen that will start appearing in the report output against all the rows.
Hope the above reply was helpful.
Kind Regards,
Ashutosh Singh
Edited by: Ashutosh Singh on May 12, 2011 8:55 AM -
Adding new constant value to an 'enum' used in a field causes an exception
We are using the DPL. I added a new constant to an enum that is used as a field on an entity called Booking (this field is not a key). This seems to cause an exception during onForeignKeyDelete when we delete an object from a related entity. The constraint is a "NULLIFY" on a "MANY_TO_ONE" relationship, so the effect should be just to nullify the Booking foreign key, but for some reason the fields are being checked and causing this exception. Shouldn't it be possible to add a new constant value to an enum without having to do some sort of migration? The stack is below. Note that the two types mentioned in the exception message are in fact the same (this is the enum). For the moment we can truncate our database, because we are still in development, but this would present a problem in production.
IllegalArgumentException: Not a subtype of the field's declared class com.chello.booking.model.BookingStatus: com.chello.booking.model.BookingStatus
at com.sleepycat.persist.impl.RawAbstractInput.checkRawType(RawAbstractInput.java:142)
at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:75)
at com.sleepycat.persist.impl.RawAccessor.writeField(RawAccessor.java:232)
at com.sleepycat.persist.impl.RawAccessor.writeNonKeyFields(RawAccessor.java:148)
at com.sleepycat.persist.impl.ComplexFormat.writeObject(ComplexFormat.java:528)
at com.sleepycat.persist.impl.PersistEntityBinding.writeEntity(PersistEntityBinding.java:143)
at com.sleepycat.persist.impl.PersistKeyCreator.nullifyForeignKeyInternal(PersistKeyCreator.java:170)
at com.sleepycat.persist.impl.PersistKeyCreator.nullifyForeignKey(PersistKeyCreator.java:137)
at com.sleepycat.je.SecondaryDatabase.onForeignKeyDelete(SecondaryDatabase.java:1082)
at com.sleepycat.je.ForeignKeyTrigger.databaseUpdated(ForeignKeyTrigger.java:37)
at com.sleepycat.je.Database.notifyTriggers(Database.java:2016)
at com.sleepycat.je.Database.deleteInternal(Database.java:800)
at com.sleepycat.je.Database.delete(Database.java:714)
at com.sleepycat.persist.BasicIndex.delete(BasicIndex.java:133)
at com.sleepycat.persist.PrimaryIndex.delete(PrimaryIndex.java:206)
at com.sleepycat.persist.BasicIndex.delete(BasicIndex.java:124)
at com.sleepycat.persist.PrimaryIndex.delete(PrimaryIndex.java:206)
Kind regards
James BrookJames,
I've started investigating this and at first look it does appear to be a DPL bug. Over the next few days I'll look more deeply and report back here with what I find. If it is indeed a bug, we'll fix this for the next JE 4.0.x release and I'll make the fix available to you.
You are correct that adding enum values is allowed without a conversion of any kind. The only change you should have to make, other than adding the enum value, is to bump the version of the containing entity in the @Entity annotation. I'm suspect you've already done that, but if you hadn't, it wouldn't cause the problem you're seeing.
We have tested the addition of enum values, but not in combination with foreign key deletion and the NULLIFY constraint, I'm afraid.
If I'm correct about it, the bug is specific to adding enum values and deleting a secondary key with the NULLIFY constraint, prior to re-writing the entity in some other way. So if the entity is updated (written) before the secondary key is deleted, then the problem should not occur. Therefore, one workaround is to call EntityStore.evolve after adding the enum value, and before using the store in other ways.
Thanks for reporting this, and I hope this is not blocking your development.
--mark -
Constant values and encapsulation
Hi All,
lookat the code below:
class Test{
public static final int flag = 10;
Public static void main(String args[])
System.out.println(i);
}here the constant value i is used inside the same class.
Now generally, we use to make separate java file for all constant values and get the values:
For example:
class UIConstants{
public static final int flag = 10;
}and call this constants values where ever neccessary:
class Test{
Public static void main(String args[])
System.out.println(UIConstants.flag);
}In most of the the time, i have seen second case is used, but it avoids the encapsulation concepts, since making variable private to public.
What is the advantages of making in this way?or is there any other reason for using this way?Are they thread-safe? No! Not by default anyway.Anything immutable and final is thread safeAs long as the immutable object really is internally
immutable and has no operations that have
side-effects on objects outside of the object.
COuld you shed some light on this.
For example even a final immutable PrintStream (which
system.out and system.err are not... see
System.setOut()) is not necessarily threadsafe
because two threads could be writing to the same
stream at the same time.I didnot know PrintStreams were immutable -
Assigning constant value in transformation rules
Hi,
I want assign the constant value USD for the infoobject 0currency in transformation rules but I cant see any option avaible
How can the constant value be assigned ?
Thanks,
SanyHi Sany,
1. Go to Your Transformation
A (Source) -> B(Target)
X ( Field) - > 0CURRENCY (Info object)
2. Right click on the Info object and select Rule Details
3. New pop-up window will be displayed there you will find option Direct assignment by default.Select constant and assign the Constant value as USD.
4. Make sure there should not be any object at the bottom.
Regards
Ram
Assign points if useful
Maybe you are looking for
-
How do I bookmark ALL tabs at one time?
Firefox 3 allow all tabs to be bookmarked at one time. Please let me know how to do this with version 4. Thanks!
-
How can I use two screens to display one window
Before Mavericks, MAC OS allowed you to use two screens (next to each other) in order to display one (big) window of one application. That would mean that a window would start on your left screen en would continue on the right screen. With Mavericks,
-
Problem facing with file upload in webdynpro
hi this is sathya, i very thank ful to your answers, coming to my problem i have written the code for file upload action method, in this below code there is no syntax problem. but there is a run time error , i.e convt_no_number kindly rectify that.
-
InfoObject to R/3 Field Mapping
Does anybody know of a list that shows the standard Business Content InfoObjects and what they typically are mapped to in R/3? The reason is that I want to use the standard InfoObjects wherever possible without creating new ones unnecessarily. As an
-
Bookmark backup file saved as "file"...Can't restore
I have to reinstall Windows XP and before I did I backed up my bookmarks using the backup feature in firefox. Now that I'm getting things back in order, firefox won't allow me to restore that file because it's not saved as either the JSON or HTML. It