How to accessing current row report column value in Lov Query?
Hi,
which access methods (eg. bind variables, substitutions, ...) for getting the current row report column value can be used in the "Lov Query" property of a report column?
As what I know of and what I have read on the forum there are no bind variables for the report columns. For the "Link Text" property it seems that the column values exist as substitution strings (#COLUMN_NAME#). But they don't work in the Lov Query. => And would be good because of a hard parse each time the Lov query is executed.
The following post (Re: Simulating a correlated sub query in lov
is showing a solution to use package variables for temporary storage of the referenced value, but the only problem with that solution is that if a new record is added with the "Add rows to tabular form" process the package variable still contains the value from the last queried row! Is there a way (variable, APEX package, ...) to determine if the lov query is executed for a new record so that the package can return null?
I know that I could write the package in a way that the value is immediately cleared when lov_pkg.keyval is called (one time read), but then I would have to create several variables if I'm accessing the value multiple times in the query or in another query => I think an one time read solution would be very obscurely.
Thanks for your help
Patrick
http://inside-apex.blogspot.com
Hi Patrick,
I agree that it's a waste to continually use Ajax to go back to the server to get the contents of a dynamic select list.
There are no bind variables for any row item - but what you do have, as per my previous post, is the value of the data entered by the user in the first row. You can pass this into your application process (using get.add("VARIABLENAME", value)), which can use it to retrieve the correct LOV in your Ajax code - this will give you a "bind variable" that your process can use.
What you could do, however, is generate hidden select lists on your page - one for each possible LOV list and replace the contents of the new row's select list with the contents of the appropriate hidden select list. This is easy to do with javascript (using innerHTML functions). Obviously, though, the usefulness of this depends on the number and size of the select lists.
Even if you don't generate them to start with, you can keep a copy of any select lists returned by Ajax in the DOM for use on new rows. So, if you have retrieved a select list, you will have a copy of it in DOM which you can then copy into the new row. If you don't have the list in DOM, use Ajax to get it, store a copy of it and copy it into the new row.
Which method you use will depend on the number/size of select lists needed. If they are few in number and/or size, I would suggest generating hidden lists. If they are large, use Ajax to get them once, store them and then retrieve them from the DOM when needed.
There is another thread here where Arie recommends going to the server every time to make sure you get the most up-to-date data for the lists. If you want to follow this advice, for this reason, use get.add("VARIABLENAME", value) to pass the value to your process. If this is not an issue, you can use one of the other methods I outlined above.
Regards
Andy
Similar Messages
-
Sql report, How to access current rows 6 columns data
I have one page having page items & SQL report having 8 columns.
First column of report is a link for editing.
on clicking first column, that record gets displayed on page items, which are opn same page.
Now my problem is i have used link column of report and set 3 page items value on click of link column.\
But i need to set values for 2 more page items.
I tried to create computation & process but not working. i am confused about which process point to select & whether onclick page gets submitted or not.
I tried to write jscript but not succeeded. I dont know how to get current row id in jscript & different column values of current rowid.
any help.Hi,
Thanks for reply.
in 5 items, first three are numeric and last two are timestamp fromtime, totime.
as I mentioned earlier if i interchange 4 & 5 items i.e. now ITEM4 is totime & ITEM5 is fromtime
and their values. I get value for totime & not for fromtime. all records contain values for all 5 columns. no null.
So basically their is no problem in value or data, The only problem is whatever sequence is maintained first 4 items get value & 5th item remains blenk.
Either I type all 5 ITEM NAMES in one Item name-value pair of link or use all three pairs, 5th ITEM remain blank. -
How to Increase the Rows and Columns Size of Bex Query in Enterprise Portal of SAP 7.3
Dear All,
Please let me know the process how to Increase the Rows and Columns Size of Bex Query in Enterprise Portal of SAP 7.3 .
Currently I am getting Only 4 columns and 10 rows in One Page .And I am getting 1,2 etc tabs for both row and column. So i want to increase the column length more than 100 and row length more than 10000.
Please suggest me a suitable solution to over come this issue.
Please find the Below screen shot.
Thanks
Regards,
SaiDear All,
Please find the attached screen shot.
The report be open with 4 or 5 columns and 5 or 6 rows.
So, please let me know how to increase the length of the table.
Do the needful for me to over come this issue.
Thanks
Regards,
Sai. -
How to increase the row and Column length of Bex query in EP Portal 7.3
Dear All,
Please let me know the process to Increase the Rows and Columns Size of Bex Query in Enterprise Portal of SAP 7.3 .
Please let settings to increase rows up 10000 and column 100 in one page.
Thanks
Regards,
SaiDear All,
Please find the attached screen shot.
The report be open with 4 or 5 columns and 5 or 6 rows.
So, please let me know how to increase the length of the table.
Do the needful for me to over come this issue.
Thanks
Regards,
Sai. -
How to get the Row and Column values in ALV (without using Objects)
Hi All,
I need to get the Row / Column when double click is used in ALV, I can use the double click event for this. However, I do not want to use the Object Oriented ALV. I want to implement the same functionality using general (using functions) ALV.
Is there any way to get the row / column values for a Generia (non-OOPs) ALV report.
Please help.
Thanks,
Vishal.Hello,
The only think you have to do is to get the index where the user clicked, and then read the internal table you sent to the alv
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'prg_name'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND' " this is to the click event!!
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = alv_layout
it_fieldcat = alv_fieldcat
i_save = 'A'
it_events = alv_events[]
TABLES
t_outtab = i_totmez. ---> TOUR IT.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
" then....
FORM user_commandUSING r_ucomm TYPE sy-ucomm
ls_selfield TYPE slis_selfield.
" r_ucomm -> HAS THE STATUS
" ls_selfield-tabindex -> HAS THE SELECTED INDEX
" THEN READ THE INTERNAL TABLE
" HERE YOU WILL HAVE THE SELECTED ROW
READ TABLE i_totmez INDEX ls_selfield-tabindex.
ENDFORM.
cheers,
Gabriel P. -
Column link - call java script & assign current report column value to item
Hi,
How to call java script and assing current report column value to item?
I have a button column in the report to 'delete' the selected row.
I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
will be executed, else no action.
In order to fire JS, I used Column Link ->Target=URL.
Problem: The alert is showing but I don't know how to pass selected row's primary
key value to process (to delete selected row).
I have a item which can be used to store selected primary key value but don't know how to assign the value
when button pressed.
Thanks in advance
DipOk. The issue has been resolved by following way.
PAGE PROCESS: delete_request
begin
delete xyz
where id = :P8_id;
commit;
end;BUTTON URL:
javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
<script language="JavaScript1.1" type="text/javascript">
function DelRec(msg, req, url){
var confDel = msg;
if(confDel ==null){
confDel= confirm("Are you sure?");
}else{
confDel= confirm(msg);}
if (confDel== true){
redirect(url); }
</script> -
How to select only rows which column has a null value?
Hi,
I adds rows to my table with data field set to null;
"INSERT INTO administrator.subzamowienia (subzamowienia.id_zamowienia,subzamowienia.id_transakcji,subzamowienia.nazwa_o,subzamowienia.nazwa_produktu,subzamowienia.ilosc,subzamowienia.nip_d,subzamowienia.data_realizacji) VALUES (administrator.id_zamowienia.curval,'0','PRAGA','Witaminy','2','43224','0');"
Then i would like to update this field after a time with new date.
To do this i need to know which rows has still data field set to null, i try sth like this but it doesn't work
"SQL> select * from administrator.subzamowienia where subzamowienia.data_realizacji='null';
select * from administrator.subzamowienia where subzamowienia.data_realizacji='null'
BŁĄD w linii 1:
ORA-01841: (pełny) rok musi być pomiędzy -4713 i +9999 i nie może być 0
or
"SQL> select * from administrator.subzamowienia where subzamowienia.data_realizacji='0';
select * from administrator.subzamowienia where subzamowienia.data_realizacji='0'
BŁĄD w linii 1:
ORA-01840: wartość wejściowa jest za krótka dla formatu daty
how to choose this rows?Hi,
VALUES (administrator.id_zamowienia.curval,'0','PRAGA','Witaminy','2','43224','0');I don't see null value...
select * from administrator.subzamowienia where subzamowienia.data_realizacji='null'Should be :
select * from administrator.subzamowienia where subzamowienia.data_realizacji is nullNicolas. -
Programmactic Access DataGrid Rows and Columns
Hello,
I am new to ActionScript. Can you tell me how can I access
the rows and columns of a data grid?
What I want to do is that when the application load, I will
populate the datagrid with the Xml returned from the webservice.
After that, webservice will be called periodically (using timer)
and the information in the datagrid needs to be updated. The cells
which are updated need to be highlighted.
The datagrid actually contains the stock market data (symbol
name and its other attributes). So once the datagrid has been
populated on application creation, it contains all the symbols in
the market. After that, only attributes of the symbols will change,
like price, volume etc. What I want is that once the datagrid is
populated, i can access the row by using the value of symbol code
and then update the appropriate columns of that symbol. (Xml from
next time will contain only symbols whose values change from last
time).
Below is the code that I have written so far.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="OnAppCreationComplete()" width="100%"
height="100%">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
private var count:uint = 0;
private var messageFramXmlList:XMLList;
private var marketSnapshotTimer:Timer = new Timer(1000);
private function OnAppCreationComplete() : void
this.ajaxServiceInvokerProxy.addEventListener(ResultEvent.RESULT,
this.OnWebServiceResultArrived);
this.ajaxServiceInvokerProxy.InvokeService.send();
this.marketSnapshotTimer.addEventListener(TimerEvent.TIMER,
this.OnSnapshotTimerTick);
this.marketSnapshotTimer.start();
private function
OnWebServiceResultArrived(event:ResultEvent) : void
var marketSnapshotXml:XML = new XML(event.result);
this.messageFramXmlList =
marketSnapshotXml.child("MarketSnapshot").child("MessageFrameList")[0].child("MessageFram e");
this.dgTopPosts.dataProvider = this.messageFramXmlList;
this.btnCounter.label = this.count.toString();
private function OnSnapshotTimerTick(event:TimerEvent) :
void
this.count++;
this.ajaxServiceInvokerProxy.InvokeService.send();
]]>
</mx:Script>
<mx:WebService id="ajaxServiceInvokerProxy"
wsdl="
http://jehanzeb/ajaxserviceinvoker/ajaxserviceinvoker.asmx?wsdl"
useProxy="false">
<mx:operation name="InvokeService">
<mx:request>
<serviceWithComonentName>DetailedSnapshotComponent.MarketSnapshot@TADAWUL</serviceWithCom onentName>
<parametersXml><![CDATA[ <Parameters/>
]]></parametersXml>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:Panel x="10" y="10" width="100%" height="100%"
layout="absolute" title="Market View">
<mx:RichTextEditor id="txtMarketViewResult" x="10" y="10"
width="612" height="194" />
<mx:DataGrid x="10" y="223" id="dgTopPosts" width="100%"
height="303">
<mx:columns>
<mx:DataGridColumn headerText="Symbol Code"
dataField="SymbolID" />
<mx:DataGridColumn headerText="Last Time"
dataField="LastTime" />
<mx:DataGridColumn headerText="Net Change"
dataField="NetChange" width="75"
/>
<mx:DataGridColumn headerText="Percent Change"
dataField="PercentChange" width="75" />
<mx:DataGridColumn headerText="Previous Closed"
dataField="PreviousClosed" width="75"/>
<mx:DataGridColumn headerText="Close" dataField="Close"
width="75"/>
<mx:DataGridColumn headerText="Direction"
dataField="Direction" width="75"/>
<mx:DataGridColumn headerText="BidPrice"
dataField="BidPrice" width="75"/>
<mx:DataGridColumn headerText="AskPrice"
dataField="AskPrice" width="75"/>
<mx:DataGridColumn headerText="BidVolume"
dataField="BidVolume" width="75"/>
<mx:DataGridColumn headerText="AskVolume"
dataField="AskVolume" width="75"/>
</mx:columns>
</mx:DataGrid>
<mx:LinkButton id="btnCounter" x="10" y="528" width="306"
textAlign="left" label="" />
</mx:Panel>
</mx:Application>To achieve what you want, I would have two functions:
* One populates the DataGrid for the first time, i.e. the
inital load
* The other does the 'update' on each interval, since there's
logic required
To update the DataGrid with only the rows that have changed,
you're going to have to compare
the incoming XML to the existing XML in the dataProvider of
the DataGrid, then selectively update the dataProvider.
You can use the
getItemAt() and
setItemAt() methods of the data provider to check each row
against the incoming data. So, some example code:
// This is the function which handles the result of your
'updated data only' webservice
private function handleUpdateInvoke (event:ResultEvent) :
void {
var incoming:XML = new XML(event.result);
var someList:XMLList = incoming.somePattern;
// For each data provider item, check the key and if it
matches
// one of the incoming keys, update it at that index
var numRows = this.dgTopPosts.dataProvider.length;
var existingDataRow:*
for (var i:Number = 0; i < numRows; i++) {
existingDataRow = this.dgTopPosts.dataProvider.getItemAt(i);
for each (var newDataRow:* in someList) {
if (existingDataRow.SymbolID == newDataRow.SymbolID) {
this.dgTopPosts.dataProvider.setItemAt(newDataRow, i);
} -
How can I preserve row and column addresses on multiple cells at once in Numbers?
How can I preserve row and column addresses on multiple cells at once in Numbers 3.2.2? I do a lot of rearranging and sorting and want to reference cells in other sheets. After entering the formulas (example: '=Sheet1::Table 1::H126') I will sort the table and the formulas will not move with the sort. I think I can fix this by going cell by cell checking the 'preserve row' and 'preserve column' boxes when editing the formula. I want to avoid having to go one by one. I know that checking the boxes creates a formula like this: '=Sheet1::Table 1::$H$126' I have also tried entering this manually and filling down but it doesn't include the preservations (the $$) in the autofill. If there is another way to remedy my sorting problem that would also be welcomed!
THANKS!!The title of the post is this
How can I preserve row and column addresses on multiple cells at once in Numbers?
I restated the Question as follows
Can "Preserve Row" an / or "Preserve Column" be set on multiple cells at the same time.
In both cases it is not asked if multiple cells can be set to....
That is a given.
Step back a second... It is like selecting multiple cells and setting the text color of the currently selected cells to red. This can be done. More than one cell at a time modified because they are currently selected.
Whats is being asked is: if more than one cell is selected at the same time can the settings "Preserve Row" an / or "Preserve Column" be applied. No table I put up will help with that question.
YES or NO
If YES how? -
Update tabular report column value using AJAX
Hi,
I'm developing an online store application whereby I would like the user to be able browse a list of products (tabluar report), enter an order quantity against a product and click a 'Buy' button (column link). This should then update a collection with the selected product id and order quantity. However, I'm struggling with how to update the order qty column value.
See http://apex.oracle.com/pls/otn/f?p=33248:1 for an example
The report displays the products from demo_product_info table. I have an additional column in the report SQL for the order quantity (set to '1').
I'm using a column link on the product_id column that sets
P1_TEMP_PRODUCT_ID = #PRODUCT_ID#
P1_TEMP_QTY = #QTY_ORDERED#
then re-renders the page.
I have a page rendering process that takes the values from the temp items and updates a collection.
When the user changes the order quantity, how do I update session state so the new value is picked up by the column link?
Thanks,
Andrew.To update session state you might check out this article titled, "ApEx: Setting session state from within a PL/SQL Package/Procedure/Function" at http://atulley.wordpress.com/2007/05/17/apex-setting-session-state-from-within-a-plsql-packageprocedurefunction/
It says:
The answer lies in the set_sesssion_state procedure found in the APEX_UTIL package. E.g.
APEX_UTIL.set_session_state(
p_name => ‘PX_MY_ITEM’
, p_value => ‘wibble’);
Now, I have a question for you. Once you set the value of the column in session state, how will you make that value be put in the database?
Thanks, Maggie -
Javascript - Referencing report column value
Hi,
In my application I have a report "Test" with some columns. In column "PFT_PCODE" the possible values are either 1 or 2.
What I want is to display the report table cell in red, if the value in "PFT_PCODE" is 1, or the table cell in orange, if the value in "PFT_PCODE" is 2, respectively.
I tried to make something in Javascript, based on a Vikas' example. I put in the
Region Header:
<style type="text/css">
.rot {
background-color: red;
.orange {
background-color: orange;
</style>
Region Footer:
<script type="text/javascript">
var spans=document.getElementsByTagName('span');
for (var j=0;j<spans.length;j++) {
if (spans[j].className=='farbe') {
var td=html_CascadeUpTill(spans[j],'TD');
if (document.getElementsById('#PFT_PCODE#').value == 1) {
td.className = 'rot';
else {
td.className = 'orange';
</script>
The column "PFT_PCODE" is marked as CSS class "farbe".
Unfortunately it's not working, I'm not sure if I reference the report column value right. Since I'm a beginner in Javascript I would be glad for help.
I put my (reduced) application on apex.oracle.com for testing.
Workspace: app
Login: [email protected]
PW: riponi
Thanks in advance,
RogerHi Roger,
In your report, if you do a View Source, do your report headers have id's on them - that is, the TH tags that contain the headings?
If so, you could use:
<script type="text/javascript">
function hilite(f1)
var h = document.getElementById(f1);
var t = h.parentNode;
while (t.tagName != 'TABLE')
t = t.parentNode;
var rows = t.rows;
var k;
var j;
var c;
var headers = t.getElementsByTagName("TH");
for (k = 0; k < headers.length; k++)
if (headers[k].id == f1)
c = k;
for (k = 1; k < rows.length; k++)
j = rows[k].getElementsByTagName("TD")[c];
if (j.innerHTML == '2')
j.style.backgroundColor = 'purple';
j.style.color = 'yellow';
if (j.innerHTML == '1')
j.style.backgroundColor = 'red';
j.style.color = 'white';
</script>Put that in the page's HTML Headers setting.
In the report region's Region Footer, add in:
<script type="text/javascript">
hilite('PFT_PCODE');
</script>This will find the heading's TH cell, work out where it is in the row, then loop through all remaining rows and check the TD cell in the same column, highlighting the cell using background and font colours.
Andy -
In the final display list how can i change rows to columns and vice versa
in the final display list how can i change rows to columns and vice versa
It's Urgent
Thanks
BasuHai,
Check this following Threads,
converting rows to columns in internal tables
Re: logic- report to move columns to row in a list
Regards,
Padmam. -
How to get current row data in table control
Hi , expert ,
I am professional in oracle , but now I am a new guy in SAP ABAP .
I have a question in UI
How to get current row data and click pushbutton in table control to open next screen ?
I want to get the current data and open next screen to carry out detail detail .
Thansk for all your suggestion .GET CURSOR LINE SY-CUROW .
READ TABLE internal_table index SY-CUROW. -
How to get Current row of ViewObject in the DoDML methode
Hi all
I have two ViewObject EmplyesView and DeptView
How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesViewOK, we can play this game on and on...
I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
Timo -
Get current row and column in JEditorPane
Hi,
I have a JEditorPane and I want to show the current row and column according to the caret position
can anyone please assist ?
Thanks,
DekelJEditorPane was designed to display HTML which may not have a great concept of row column once you start adding tables and other fancy stuff. If you only have text data then I would use a JTextArea or JTextPane, they are easier to work with.
I want to show the current row and column according to the caret positionCheck out this posting:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=608220
Maybe you are looking for
-
How to Assign a Field value to a Variable??
Dear All, Kindly let me know, if <b>"HOW TO ASSIGN A FIELD VALUE TO A VARIABLE????"</b> Situation is, we have a Field (OBJK-TASER) in which 2 tables (SER01 & SER03) are stored. And we want to access names of the Tables which are there in the field(TA
-
Why is the Apple logo blinking?
When I woke up this morning, my iPhone was doing fine. I pulled up an app and within two minutes, it darkened, a line showed up on the screen, then it turned off. I tried to plug it in, and it was unresponsive to being charged. Now, only the Apple lo
-
IPhoto 9.1.1 problem with Help
I have downloaded the new version of iPhoto the day before yesterday and have tried on many occasions to open the Help file but impossible to do. I just obtain an empty window with the cursor running indefinitely. Even if I force iPhoto to leave that
-
Missing /dev/log stream?
Hi All, I just installed Solaris 10 onto a Sun Ultra 2 Enterprise box and I'm trying to get jailkit 1.3 to work. Upon starting jk_socketd, it's complaining that /dev/log doesn't exist and it wants that socket stream. How do I create the socket stream
-
I've forgotten my 4 digit pin code. How do I recover it?
Did you not read any of the posts in this thread? The answer was given in posts 2 and 4.