Getting value of an element in the previous record in a table
Good afternoon
I'll try to explain my problem:
I have a block table points X, Y and Z (all are elements of database)...
On the first record, the user is required to set the values for all the elements...
For the rest of the records, the value of X must be the value of Z in the previous record.
How I could do and what is the best way to do it?
Thanks in advance.
Daniel Guzzo
OK, problem solved by myself:
IF: System. CURSOR_RECORD! = 1 and: global .rec_changed = 0 THEN
: global .rec_changed: = 1;
PREVIOUS_RECORD;
: global .fec_hasta: = to_char(:cret_prod_pol_renovacionesb.crpn_fe_hasta,'DD-MM-YYYY');
NEXT_RECORD;
: global .rec_changed: = 0;
IF: global.fec_hasta is null THEN previous_record; end if;
: cret_prod_pol_renovacionesb.crpn_fe_efectiva: = to_date(:global.fec_hasta,'DD-MM-YYYY');
-MESSAGE(:global.fec_hasta);
END IF;
If anyone has a better solution, it will be welcome.
Thank you
Tags: Oracle Development
Similar Questions
-
Hello
I was wondering if I could get some information and opinions on the use of an array of type defined clusters to store configuration data. I am creating a program to test several EHR and wanted to have a control of type defined for each HAD with the information needed to create the DAQmx tasks for all signals for it must HAVE. I am eager to do so that the data are encoded in hard and not in a file that the user might spoil.
Controls of type def are then put into a Subvi who chooses as appropriate, one based on the enumeration of Type DUT connected to a case structure.
I have problems with the control of the defined type. I see issues when you try to save a configuration unique to each element of the array in the array of clusters. Somehow, it worked at first, but now by clicking on "Operations on the data--> default font of the current value ' on individual elements of the cluster or the entire cluster (array element) does not save data when I re - open the command def. What I am doing wrong? I'm trying to do something with the berries of the clusters that I shouldn't do?
I enclose one of the defined reference type controls. I tried to change it bare to see if that helped, but no luck.
To reproduce, change the resource string for the element 0 of the array and do the new value by default. Then close the def of type, and then reopen it. The old value is always present in this element. The VI is saved in LabVIEW 2012.
The values of a typedef are not proprigated to the instances of the control. They get if created WHEN data values have changed. They will be not updated with the changes to come. You must create a VI specifically to hardcode your values or to implement a file based initialization. The base file would be much better and more flexible. If you don't want users to change the data simply encryption. There is a wedding blowfish library that you can download.
-
How I've hidden the elements after the query when moving back to the previous record
Hello world
I create a form with the developer 6i and I use set_item_property(item_name,visivile,...), in post_change, in when_list_change relaxation too
to hidden and activate certain elements.
When I enter the data, everything works fine, when I do a request for enforcement to the data set and move to the next record every thing works fine, but
When I want to go back to the previous record, the two triggers does not,
could someone tell me where to put this code, so it can walk perfecty when I move to the next record or previous record
best regards;
You can use one - news - when? -Instance triggers (where? = point, Record, block, etc.).
Craig...
-
elements of the previous project interfering
Hi guys, I just started a new project and somehow there are elements of the previous project interfere. Everything is up-to-date and I rebooted the machine. Thank you!
Purge your cache and memory settings in AE.
-
Move the 2 values to 2 elements in the interactive report via a url
Hello
I have it here's the url to pass the 2 values to 2 elements in the interactive report via a url
apex_util.prepare_url ('f? p = & APP_ID.:0 00 :'||: APP_SESSION |':000:P000_STATUS, P000_DATE :'|| ccodes.code, '1 year') in the form of url
The second value is not passed in, P000_DATE the interactive report item. "1 year" is the option in the selection list on . I also tried below and a combination of IREQ_, etc., but no worked
apex_util.prepare_url ('f? p = & APP_ID.:0 00 :'||: APP_SESSION |':000:P000_STATUS, P000_DATE :'|| ccodes.code,'| 1 year "")
Some advice on this one?
Thank you
Alexander
The code doesn't seem right for me
apex_util.prepare_url ('f? p = & APP_ID.: 0 00 :'||: APP_SESSION |':000:P000_STATUS, P000_DATE :'|| ccodes.code, '1 year') in the form of url
Ilyalieude modifierlereglement like this.
apex_util.prepare_url ('f? p = & APP_ID.: 0 00:' |: APP_SESSION |) ": 000:P000_STATUS, P000_DATE:' |" ccodes.code | 1 year") in the form of url
Kind regards
-
How to disable a page based on the value of another element on the Page element?
Hello
How can I turn a page element using javascript based on the value of another element on the page?
Eg: P1_TEXT want to be disabled if the value in P1_LCOK = "LOCK".
How can I do this using javascript. I want this implemt on loading the page.
Kind regards
BenzPut this function in the page header:
and call it in the footer:
f_disable_item;
Denes Kubicek
------------------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------------------ -
Records of paint according to the previous record
Hi all
I need a bitch the foreground color of a record by a field in the previous record, I mean, if the current record contains the same data as the previous it should be blue, but it is different to be red.
can anyone tell me how and in which trigger.
THX!In addition Francis... If you block based on SQL query you can use the functions of LAG and LEAD in your SQL to get the previous values in the same line.
-
calculate the balance depends on the previous record result
Hello
I have a requirement like calculating the balance depends on the previous record result. but I'm unable to accomplish by using select statement.
Sample data: WITH T AS (SELECT 10 AMOUNT, 0.2 PERCENT FROM DUAL UNION ALL SELECT 11 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 12 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 13 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 14 AMOUNT, 0.3 PERCENT FROM DUAL )
process: 10(AMOUNT) * 0.2(PERCENT) = 2 11 - 2(Result of previous calculation) = 9 12 - 9(Result of previous calculation) = 3 13 -3(Result of previous calculation) = 10 14 - 10(Result of previous calculation) = 4;
Please, help me build the select statement.required output. AMOUNT RESULT 10 2 11 9 12 3 13 10 14 4
There is no order in the lines of the relational table. Only ORDER BY guarantees the order. So, even if the AMOUNT is increasing in your sample, I guess in life real amounts are in no particular order. If Yes, you need another column indicating the order of the lines:
WITH T AS ( SELECT 1 ID, 10 AMOUNT, 0.2 PERCENT FROM DUAL UNION ALL SELECT 2 ID, 11 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 3 ID, 12 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 4 ID, 13 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 5 ID, 14 AMOUNT, 0.3 PERCENT FROM DUAL ) SELECT AMOUNT, RESULT FROM T MODEL DIMENSION BY(ID) MEASURES(AMOUNT,AMOUNT RESULT,PERCENT) RULES( RESULT[1] = RESULT[1] * PERCENT[1], RESULT[ID > 1] ORDER BY ID = RESULT[CV()] - RESULT[CV() - 1] ) ORDER BY ID / AMOUNT RESULT ---------- ---------- 10 2 11 9 12 3 13 10 14 4 SQL>
If the AMOUNT is still growing:
WITH T AS ( SELECT 10 AMOUNT, 0.2 PERCENT FROM DUAL UNION ALL SELECT 11 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 12 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 13 AMOUNT, 0.3 PERCENT FROM DUAL UNION ALL SELECT 14 AMOUNT, 0.3 PERCENT FROM DUAL ) SELECT AMOUNT, RESULT FROM T MODEL DIMENSION BY(ROW_NUMBER() OVER(ORDER BY AMOUNT) ID) MEASURES(AMOUNT,AMOUNT RESULT,PERCENT) RULES( RESULT[1] = RESULT[1] * PERCENT[1], RESULT[ID > 1] ORDER BY ID = RESULT[CV()] - RESULT[CV() - 1] ) ORDER BY ID / AMOUNT RESULT ---------- ---------- 10 2 11 9 12 3 13 10 14 4 SQL>
SY.
-
Navigate the previous record, next record by entering the key in place and key press
Hello
JDeveloper11g_
I am trying to solve how to navigate the previous record, then register by entering the key in place and key press to the table of the ADF.
If any of you have this solution by JScript of Backing Bean please help me.
Thank you
Zed
===Hi Zaza,
Try tweaking the Javascript code, as shown below.
/** Change this line below .... **/ var newStr = id.replace(/:\d:/, ':' + numValue + ':'); /** ... to this... **/ var newStr = id.replace(/:\d+:/, ':' + numValue + ':');
Kind regards
Amélie Chan -
How can I get a value of an element to the variable?
I have a simple page with name and address on a form text fields.
First name: (txtLastName)
First name: (txtFirstName)
Address: (txtAddress1)
etc...
Once the user enters information, what is the syntax for this information in a form variable? I want the variables available on the next page.
$varLastName = ["txtLastName"]; ?
Thank you.
PS I am obviously a newby and am very frustrated. I would appreciate your help!
What I read, it seems that I should use Session variables to store data from one page to another, but I don't know how to do this.
Google can help you here. It's pretty simple.
Can I publish data without that happening in a database?
Of course - when you submit a form, it is displayed to the next page in the header, so that it is not visible by the user.
If you want to have several forms on the page, each page can submit each page, where the data from the previous page is loaded in hidden fields. In this way, each page shows the cumulative set of data. Who is?
-
Cannot save file \resource <; labview >; element to the previous version
Hello
I have a quick fall plugin written in LabVIEW2013, without any new feature.
I am recording this plugin in the previous version, but I get this message: "unable to save the items in the \resource
folder to the previous version. Even after the removal of the entire contents of my VI, I get the same error...
What is the problem with this resource file?
With previous versions of LabVIEW, I was able to do it without any problem.
Thanks for your advice!
So OR locked. Simply copy the VI on your desktop and then register for precedent. I can understand why they would want to prevent you from doing this since so many things change from one version to the other. But this is all new for 2013 (just tried with 2012 and it was fine).
-
Could not save the different string value to each element of the array
I have a configuration of VI to read several channels Veristand project. The entrance is a table 1 d of channels, (an element for each channel, I want to read). The channels have different names, each of the elements in the chain must be different. I am able to edit each item and run the VI, and it works fine. However, if I save, close and reopen the VI, all elements show the same value (what happens to the value of the last element for which I defined a default value). Is this behavior planned, or have I missed a configuration setting which would allow different string values? Please notify. Thank you.
GSinMN
Make sure that you select the table and not only one item when you right click-> set by default on the front panel.
-
APEX 4.2.5: How reference a column element in the previous line?
Good afternoon
I have the following problem:
I have an IR on a table that contains the values of daily clock of energy (gas and electricity).
Now, I want to set up a calculated column that contains the daily consumption.
Power_actual_row - power_previous line.Is this possible and if yes how can I achieve this?
Kind regards.
Wilfried
Baerenmarke wrote:
I have the following problem:
I have an IR on a table that contains the values of daily consumption of energy (gas & electricity) clock.
Now, I want to set up a calculated column that contains the daily consumption.
Power_actual_row - power_previous line.Is this possible and if yes how can I achieve this?
Add a POWER_PREVIOUS column to your report query using the analytical function LAG to access the value of the POWER of the previous row. Use the ORDER byclause in the function to determine the order of the lines. The calculation of the IR then simply uses the POWER and POWER_PREVIOUS values for the same line.
-
Hallo,
I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.
I need to go to the second page the value of a field on the line that is selected on the first page.
How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?
Thank you
F.
Why would user, you need to pass a value of the line to the shape?
The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.
Timo
Post edited by: Timo Hahn
And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf -
Deactivating a page element based on the value of another element on the page
Hello
I have a page element I want to turn off if the value of another article (drop-down list item) is set to a specific value. I followed the example in the book 'Pro Oracle APEX"(p.320) in this regard. He ordered me to do this in the HTML form element attributes for the element section:
OnChange = "htmldb_item_change (this); html_DisableOnValue (This, 'Closed', 'P3_PRIORITY', 'P3_ASSIGNED_TO'); »
It works very well. It disables the element I want to disable. HOWEVER, it does not neutralize the article unless the element with the onchange attribute is changed.
How can I add features to disable the second element, even if the first element does not change, but contains the value 'Closed' when the user of the first load of the page?
Thanks for your help and your insight!
-ReidHello Reid,
The easiest way would be to (also) a Condition only read the item that you want to disable.
Greetings,
Roelhttp://roelhartman.blogspot.com/
Maybe you are looking for
-
This seems to happen on all the Youtube video I play. I don't know other videos because I rarely find out all others. When the video freeze arrives that the download bar is always before the bar of games so I don't think that download is the problem.
-
I enlarged a page &; now I can't get it back to normal size.
I wanted a larger photo, so I pressed a button indicating that I could enlarge the photo. now, I can't get the screen back to normal size.don Firefox
-
How to add a new language to the language and region of the Panel
HelloSetting preferences in Mac OS X, I could ' t help noticing the huge amount of languages available in the Mac OS X El Capitan. Located in same languages like Klingon, Navajo and Latin - and of course, this looks like a great tribute to the rich d
-
HP ENVY 15-u010dx: HP ENVY 15-u010dx
Hi, I have a HP ENVY 15-u010dx that will not start... no fans no lights at all, except the charging light doesn't turns white when it is plugged. It flashes also once very slowly. What does that mean? I have it apart and need help solving problems wi
-
I would like to plugin pinnacle Hollywood fx pro 17 pinnacle Studio ultimate. How it is possible, or what is its target file. Is self-employment but I think it should be work as a plug-in. Thank you