Refresh the zone using dynamic action
HelloI have a page in my application with two different regions. First region has a selection list and second region has a report and the report query uses the value of the selection as a variable binding list.
I created a dynamic action to refresh the report region when the value of the selection list is changed.
It works very well and the report is updated after changing the value, but once the updated report of State lines are different.
When I move the mouse over the lines, the background color changes and when I move the mouse from the line, it does not scale to the original color.
Is this a bug?
Thank you
Machaan
Hi Machaan,
good news, the problem reproduced no more on APEX 4.0.2 which will be our next group of hotfixes.
Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf
Tags: Database
Similar Questions
-
refresh the report with dynamic action title
Hi all
I have a report that is updated with dynamic action. When the update is done, first the value of two hidden variables are defined (P2_ID and P2_NAME) and are subject (using a dynamic action type "pl/sql", with the code "null"; and items to submit page: P2_ID, P2_NAME).
In the report query, I use: P2_ID in the where clause. Everything works like a charm! The only thing that doen't work, is the title of the region: which is defined as "properties of & P2_NAME.", but the title is not updated when the report is refreshed.
Is there a solution for this? I hope I am clear enough.See Re: dynamic action - update
If you are right; the native just Refresh action updates the content of the report, it does not perform & POINT. substitutions throughout the region.
What you could do is use a RANGE named as the title as
&P2_NAME.
and add a REAL action to your dynamic Action to set the title using Javascript to run code
$s('my_title',$v('P2_NAME'));
I hope this helps.
-
change the results of the report with the selection list using dynamic action
This is one of those situations where if I could understand the appropriate search terms to use, someone else must have asked this question in the past.
I have a report with a SQL query with a condition based on a list of selection on the same page. So I have a list of selection -: P177_FISCAL_YEAR
My request for my report is:
Select md_id, display_name, description
of media_tbl
where fiscal_year =: P177_FISCAL_YEAR
When a person makes a selection on the selection list (: P177_FISCAL_YEAR), I would like to report up-to-date without having to submit the page. I was hoping that I could do something like this using a dynamic action but have not found a way to do it.
Thanks in advance!
JohnCreate dynamic Action:
When
Event: change
Selection type: product (s)
Article (s): P177_FISCAL_YEAR
Condition: - unconditionally.Real Actions (add 2 real actions)
-the first is to load the value in session state so that the report can see.
Sequence: 5
Action: execute the PL/SQL Code
Code PL/SQL: null;
Items to submit page: P177_FISCAL_YEAR-the second to refresh the report
Sequence: 10
Action: Discount
Selection type: region
Region: -
Refresh the region in a table using dynamic action
Hello
I'm stumped on this scenario please advise. I have a dynamic action a button that when clicked fires real action pl/sql that will add a member to a collection, it works as expected, but the second real action on the same button will refresh the tabular form/report region. This isn't refreshing my form/report.
To know that if we can indeed I created a report on the same page, based on the same point of view and dynamic action works.
So why the dynamic action of refreshing working on my new report and not on the form of tables. I found a tabular presentation just a report of updateble.
I use apex 4.1.0.00.32
Help, please.Right-click of the tabular form > click attributes report > go to layout and pagination > set yes partial page refresh
-
helps with the update of tabular form using dynamic Action
Hello world
I'm trying to simplify a tabular presentation based on a collection so that it uses more dynamic actions that will be ultimately more easy for us to debug.
Our tabular presentation is based on the query:
SELECT apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow", seq_id, seq_id display_seq_id, c003, c004, c005, c006, apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit, apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0',' -- Select Favorite -- ','f08_'||seq_id,'') Disposition, apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear, apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity, apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price, apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars, decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished, c014, c015, c016, c017 additional_measure_flag, decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY, decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT, c024 fins_attached, apex_item.textarea(28,c028,3,null,'class="hms_info"','f28_'||seq_id,'') Explanation, decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','class="hms_info"''onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale, c030, c031, c032, c033, c034, c035, c036, c037, c038, c039, apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;" class="hms_info" ',null,null,null,'f40_'||seq_id,'') HMS_AREA_CODE, c020 hms_flag, apex_item.text(41,TO_NUMBER(c041),5,null, 'class="hms_info"','f41_'||seq_id,'') Sale_Price, c042, c043, c044, c050 shark_flag from apex_collections where collection_name = 'SPECIES_COLLECTION' order by seq_id
Note that many of the fields referenced are c0xx... and really serve as place holders so that the c0xx = fxx. It's awkward, like every time that a movement or move a column, it upsets the fxx value. So, I tried to use the CLASS if possible.
I have a dynamic action that had worked perfectly, until I moved one of the columns... and now, it seems not to work when I'm trying to update anything with the HMS_INFO or SHARK_INFO class. Grrr.
dynamic action: CHANGE COLUMN
event: CHANGE
selection type: JQUERY SELECTOR
jQuery selector: input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], input [name = "f24"], textarea [name = "f28"], select [name = "f40"], input [name = "f41"]
true action1: defined value, expression javascript, set P110_ID = this.triggeringElement.id
true action2: defined value, expression javascript, set P110_VALUE = this.triggeringElement.value
true action3: run pl/sql,.
declare v_attr number; v_seq number; begin v_attr := TO_NUMBER (SUBSTR (:p110_id, 2, 2)); select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual; safis_collections.update_column(v_seq, v_attr, :p110_value); end;
the safis_collections.update_column package is:
procedure update_column(v_seq in varchar2, v_attr in number, v_value in varchar2) is begin apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION', p_seq => v_seq, p_attr_number => v_attr, p_attr_value => v_value); apex_debug.message('updated column. seq='||v_seq||' attribute='||v_attr||' with '||v_value); end;
I wonder if there is a way to make the CLASS in my JQUERY SELECTOR, so something like reference entry [class = "HMS_INFO"], input [CLASS = "shark_info"]... and if so, what happens if a single item in the class is an option button and the other is a selection list and the other an element?
is it possible to not have to rely on the fxx. Currently, my collection columns map to the investment in the form of tables... sense, c024 = f24... because I placed c024 to be the 24th editable column, but this seems crazy. Is there a simpler way? I'm just learning class, then maybe there is something extra, or rather that I could use...
any help is appreciated. Thank you!
I think I have solved the problem.
dynamic action: CHANGE COLUMN
event: CHANGE
selection type: JQUERY SELECTOR
jQuery selector: input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], .shark_info, .hms_info
true action1: defined value, expression javascript, set P110_ID = this.triggeringElement.id P110_VALUE POINT KEYS
true action2: run pl/sql code
begin null; end;
items to submit page: P110_ID
true action3: defined value, expression javascript, set P110_VALUE = this.triggeringElement.value P110_VALUE POINT KEYS
true Action4: value: PL/SQL expression, the value P110_SEQ = rtrim (substr(:P110_ID,5,4),'0 ') CONCERNED POINT: P110_SEQ
true Action5: run pl/sql code
declare v_attr number; begin v_attr := TO_NUMBER (SUBSTR (:P110_id, 2, 2)); apex_collection.update_member_attribute (p_collection_name => 'SPECIES_COLLECTION', p_seq => :P110_SEQ, p_attr_number => v_attr, p_attr_value => :P110_VALUE); end;
items to submit page: P110_ID, P110_VALUE, P110_SEQ
true action6: refreshment area
I think it is the combination of the use of pl/sql expression to calculate P110_SEQ and also your tip on TRUE ACTION2 to submit the item that did the trick.
Thanks Kofi, for your patience and help! It was great.
Ugh... on the next issue.
Karen
-
Is it possible to change the definition of LOV uses dynamic action?
Hello
I have a multiple selection LOV page article, P27_MULTI_CLASS_CODE, defined as below. The loading of the page, this list contains only values based on what was passed to P27_OLO_CODE or P27_OLO_CODE_SW.
SELECT DISTINCT c.class_code d, c.class_code r
O ORGANIZATION,
POSITION p,
CLASS c
WHERE o.org_wk = p.org_wk
AND p.class_wk = c.class_wk
AND o.org_active_flag = 'Y '.
AND p.pos_active_flag = 'Y '.
AND c.class_active_flag = 'Y '.
AND (o.olo_code =: P27_OLO_CODE)
GOLD o.olo_code =: P27_OLO_CODE_SW)
ORDER BY c.class_code ASC
Before submitting the page, I want the definition of LOV's P27_MULTI_CLASS_CODE to change the following (similar application without reference to the P27_OLO_CODE or P27_OLO_CODE_SW) based on the question if the user selects a checkbox, P27_ALLOW_SW. In doing so, P27_MULTI_CLASS_CODE would contain a wide range of values, rather than the limited values.
SELECT DISTINCT c.class_code d, c.class_code r
O ORGANIZATION,
POSITION p,
CLASS c
WHERE o.org_wk = p.org_wk
AND p.class_wk = c.class_wk
AND o.org_active_flag = 'Y '.
AND p.pos_active_flag = 'Y '.
AND c.class_active_flag = 'Y '.
ORDER BY c.class_code ASC
I wanted to avoid writing Javascript. Is this possible using dynamic measurements... or at least somehow update P27_MULTI_CLASS_CODE so that it ignores the P27_OLO_CODE and the P27_OLO_CODE_SW?
Tried to create dynamic action to clear the value of P27_OLO_CODE or P27_OLO_CODE_SW, in the hope this would trigger P27_MULTI_CLASS_CODE to display all the values, but it has failed. Any ideas?
APEX 4.2
You can do this by editing the query lov a little:
SELECT DISTINCT c.class_code d, c.class_code r FROM ORGANIZATION o, POSITION p, CLASS c WHERE o.org_wk = p.org_wk AND p.class_wk = c.class_wk AND o.org_active_flag = 'Y' AND p.pos_active_flag = 'Y' AND c.class_active_flag = 'Y' AND ((:P27_ALLOW_SW = 'Y' AND (o.olo_code = :P27_OLO_CODE OR o.olo_code = :P27_OLO_CODE_SW)) OR :P27_ALLOW_SW = 'N') ORDER BY c.class_code ASC
(of course, use the correct value for P27_ALLOW_SW)
The "cascade LOV Parent article (s)" value P27_ALLOW_SW and also add "Page elements to submit" element (Note: this item appears only when you have entered a value in the element of parent lov cascading items)
Now, after changing P27_ALLOW_SW the lov will update to P27_MULTI_CLASS_CODE.
-
help to try to simplify the form table, based on the collection using dynamic measurements
Hi everyone, I have tried cleaning and simplify an application designed in 2008 apex 3.2. We have improved in 4.1.2 and want to take advantage of our understanding of the apex and the dynamic measures to simplify a large part of our code, get rid of the redundancies and make it easier for the programmer to debug and improve next.
The application is for traders and commercial fishermen and currently has around 4100 users.
The part that I'm trying to simplify is a tabular report, based on a collection. Almost all areas in this tabular form has a logic linked to it... and in most cases, it is superfluous in that it executes a UPDATE_MEMBER on the collection. I would like to remove as much of javascript and additional processes as possible. I'm also still very new to jQuery and javascript, and faced with the two... but competent in pl/sql.
tabular query is:
{code}
SELECT
seq_id,apex_item. Text (1, seq_id, "," "id ="f01_"| seq_id,",")"DeleteRow. "
apex_item.text_from_LOV (C004, 'SPECIES'). » -'|| apex_item.text_from_LOV (C005, 'RANK') | » -'|| apex_item.text_from_LOV (C006, 'MARKETCODE') | » -'|| Unit apex_item.text_from_LOV_query (c007, 'select unit_of_measure d, unit_of_measure r species_qc'),
apex_item.select_list_from_LOV (6, c008, "STOP," onchange = "getAllDisposition('||) seq_id. "" ")" ',' YES, '0', "- Select favorite -", ' f06_ ' | seq_id, cm) available.
apex_item.select_list_from_LOV (7, c009, style of ' GEAR, "=" background-color: #FBEC5D;) "onFocus ="checkGearPreviousFocus('||). " seq_id |') ; "OnChange ="getAllGears('|| seq_id ||). " "" ")" ',' YES, 'f07_', "- Select favorite -", "3333" | seq_id, cm) Gear,.
apex_item. Text (8, TO_NUMBER (c010), 5, null, "onchange ="setTotal('||)) seq_id. ")" «, » f08_'|| seq_id, cm) quantity.
apex_item. Text (9, TO_NUMBER (c011), 5, null, "onchange ="getPriceBoundaries('||)) seq_id. ")" «, » f09_'|| seq_id, cm) price.
apex_item. Text (10, TO_NUMBER (c012), 5, null, "onchange ="changePrice)
('| seq_id |') "onKeyDown = selectDollarsFocus('||) "(seq_id |', event);" ',' f10_'| "" seq_id, cm) $,.Decode (c013, 'Y', apex_item.text (11, c014, 30, null, "style =" background-color: #FBEC5D;)) ' onClick = 'onFocusAreaFished('|| seq_id||'); "',' f11_'. seq_id, cm), "n","N/A") Area_Fished, "
Decode (c017, 'Y', apex_item.text (12, c018, 4, null, "style =" background-color: #FBEC5D;)) "onBlur ="setUnitQuantity('||). " seq_id. ")" «, » f12_'|| seq_id, cm), "n","N/A") UNIT_QUANTITY, "
Decode (c017, 'Y', apex_item.text (13, 'CN', 3, null, "readOnly = readOnly; ',' f13_'|")) seq_id, cm), "n","N/A") UNIT_COUNT, "
Decode (c050, 'Y', apex_item.checkbox (14, 'Y','id = "f14_" | seq_id |')) "style =" background-color: #FBEC5D; " onClick = "alterYes('|| seq_id||');" "onKeyPress = alterYes('||) (("(seq_id |');" ', c021), "n", "S/o") FinsAttached,.
decode (c050, 'Y', apex_item.checkbox (15, ', "id ="f15_"|")) seq_id |' "style =" "background-color: #FBEC5D;" onClick = "alterNo('||)" seq_id |') ; "onKeyPress = alterNo('||) (("(seq_id |');" ', c022), "n", "S/o") FinsNotAttached,.
Decode (c050, 'Y', apex_item.checkbox (16, 'U','id = "f16_" | seq_id |')) "style =" "background-color: #FBEC5D;" onClick = "alterUnk('||)" seq_id |') ; "onKeyPress = alterUnk('||) (("(seq_id |');" ', c023), "n", "S/o") FinsUnknown,.
Decode (c050, 'Y', apex_item.textarea (17, c028, 3, null, "onchange ="setExplanation('||))) seq_id. ")" «, » f17_'|| seq_id, cm), "n","N/A") explanation, "
Decode (c024,' no, apex_item.select_list_from_LOV (18, c029, 'HMSNATURE','onchange = 'saveNature('||))) seq_id. ")" ',' YES, ' one ', "- Select Nature of sales -", "f18_" | seq_id, cm), 'U', apex_item.select_list_from_LOV (18, c029, 'HMSNATURE','onchange = "saveNature('||)) seq_id. ")" ',' YES, ' one ', "- Select Nature of sales -", "f18_" | seq_id, cm), 'Y', 'N/a') Nature_Of_Sale,.
decode (c020, 'Y',
apex_item.select_list_from_LOV (40, c040, 'HMS_AREA_CODE',
"style =" background-color: #FBEC5D;
"onchange ="saveHMSAREA('||). " seq_id |', this.value) "',' f40_'|" seq_id, cm),
(' N N/A ',' ') HMS_AREA_CODE;C020, c050,
decode (c020, 'Y',
apex_item. Text (41, TO_NUMBER (c041), 5, null, "onchange ="setSalePrice('||)) seq_id |', this.value) "',' f41_'|" seq_id, cm),
(' N n/a ',' ') Sale_Priceof apex_collections
where collection_name = 'SPECIES_COLLECTION' order by desc seq_id{code}
I am slow at first and just try to replace the ONCHANGE for apex_item 41 (retail price). I hope that finally replace all the onblur/onchange to use the same dynamic action.
The ONCHANGE for apex_item 41 is currently:
{code}
function setSalePrice (pRow, savePrice)
{
get var = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is saveSalePrice', 0);
Get.Add ('SETVALUE3', savePrice);
Get.Add('ATTRNBR3','41');
Get.Add ('SEQUENCEID', Prow);
gResult = get.get ();
}
{code}
the saveSalePrice application process is:
{code}
Start
apex_collection.update_member_attribute (p_collection_name = > 'SPECIES_COLLECTION',)
p_seq = >: SEQUENCEID.
p_attr_number = >: ATTRNBR3,.
p_attr_value = >: SETVALUE3);
end;
{code}
I created two new hidden fields: P110_ID and P110_VALUE.
I created a dynamic action: CHANGE COLUMN
event: change
selection type: jQuery Selector
jQuery Selector: input [name = "f41"]
real action 1 - records P110_ID with javascript expression: this.triggeringElement.id
real action 2 - P110_VALUE value with javascript expression: this.triggeringElement.value
true action 3 - run pl/sql code
{code}
declare
number of v_member;
number of v_seq;Start
v_member: = TO_NUMBER (SUBSTR (: p110_id, 2, 2));
Select ltrim (substr(:p110_ID,5,4),'0 ') in the double v_seq;safis_collections.update_column (v_seq,
v_member,
(: p110_value);
end;{code}, where safis_collections.update_column is a package of db
{code}
Procedure update_column ()v_seq in varchar2
v_attr in number ,
v_value in VARCHAR2 )
is
Start
apex_collection . update_member_attribute()p_collection_name=> 'SPECIES_COLLECTION'
p_seq = > v_seq ,
p_attr_number = > v_attr ,
p_attr_value = > v_value );
apex_debug . message ()'put a day of column.seq ='| v_seq || 'attribute =' || v_attr || "with" || v_value );
end ;
{code}
real action 4 - refreshment area
I modified the query in a table to reference apex_item 41 to be
Decode(C020,'Y',apex_item.) Text (41, TO_NUMBER (c041), 5, null), 'No,' N/a ') Sale_Price in the hope that it would fire the dynamic action. I get the below error. The value of P110_ID is null, the value of P110_VALUE seems to be correctly set.
call returned Ajax Server ora error-sequence of 20103:member does not work
There are in the collection 'SPECIES_COLLECTIO' application to run PL/SQL codeI appreciate all thoughts/help on this.
Thank you, Karen
AHHA. change the query to
Decode (c050, 'Y', apex_item.textarea (28, c028, 3, null, null,,'f28_'| seq_id, cm), ' n ',' n/d "") explanation,.
and that did the trick. On the next item.
-
Back to zero/recalculate value if the element with dynamic action
Hi all
What I have is a part of "total amount". When the other elements on the form are filled, these values are subtracted from the total. My problem is that when a few points to say a filled out, but then set to zero, the figure in the total does not reset. If no new figure added, are more excluded.
For example:
total = 10
Value of 1 changed to 5. Total = 5.
Value of item 2 changed to 1. Total = 4.
Value of 1 changed to 2. Total = 2.
I find it tricky is because the total is derived from an action of current setpoint led other points. Finally, I would like to reset or re - run the calculation for the total, without duplicating the original action of the set value. I tried to use a dynamic action "Refresh" but I don't think that work in this way. Is there another way?Why not save the original value to an item hidden page (or even in a global variable set before you run the JS calculation for the first time in javascript).
During the reset, set the value of the element with the value of the hidden (or variable). -
Tabular form using dynamic Action set
I have a tabular presentation created using APEX_ITEM.
That is to say. APEX_ITEM. SELECT_LIST_FROM_LOV(3,NVL(D.FK_ATTENDANCE_CODE,'%null%')
I want to use a dynamic Action to set the value based on the value of a hidden page element.
I created a Page element 'P1358_HOLD_ATTENDANCE_CODE', and I can see he's up to the correct value.
I tried to create a dynamic Action (run Javascript) to set the form of tab selection list item (f03), but it does not work.
Here is what I tried:
var line = $x_UpTill (this.triggeringElement, 'TR');
var otherElement = $(' input [nom = "f03"]', ligne) [0];
otherElement.value = $x('P1358_HOLD_ATTENDANCE_CODE').value;
Any ideas?
I know, as a backup, I could put the ID = when creating elements in a tabular form so that all the lines are different, but I hope that the JQuery can do it more easily.
Thank youDid change selection that I said fix the prob?
If this isn't the case, him DA is without a doubt was fired at your event?
-
Apex_util.redirect_url in 4.1.1 using dynamic action
Hello
I'm trying to implement a dynamic action in charge that will redirect users to the home page of any other page if certain values are undefined.
So, I set DA for event "Page loading", the following PL/SQL execution
based on the other topics in the forum, as well as this post from Scott SpendoliniDECLARE l_url varchar2(2000); BEGIN l_url := APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:HOME:&SESSION.'); wwv_flow.g_unrecoverable_error := true; htp.init(); apex_util.redirect_url(l_url, true); END;
http://spendolini.blogspot.com.au/2006/02/page-0-branches.html
When I run in debug mode, I can confirm that her DA is shot, but it raises an error
Any suggestions?Dynamic Action Fired: Redirect when blah (NATIVE_EXECUTE_PLSQL_CODE) jquery-1.6.2.js:561 Uncaught SyntaxError: Unexpected token <
ScottTo do this, you must use a process page which on before the page header.
-
Use Dynamic Actions with pl/sql, calling a javascript alert function
Hello
I use Apex 4.0.1.00.03 with IE7.
The problem I have is:
I am converting an Oracle Forms application that has a lot of logic in it. In the application forms, it is a pl/sql function, based on a If/else condition call a popup alert box, which displays a warning message. He called pl/sql functions that return raising to the IF statement.
Example of pl/sql code:
If check_records() > 0 Then
message to the alert box
ElsIf TypeA_record then
message to the alert box
On the other
message to the alert box
End If;
I need to replicate this functionality to the Apex 4. I tried to create dynamic Action on a page element, using a pl/sql function, however, when I call the popup javascript, this code not popup an alert box. I need the pl/sql to be run when the element of the page changes, not when the page is sent.
The code I used to test the pl/sql code, which does not work in dynamic Actions > pl/sql is:
Begin
HTP.p ("< script type =" text/javascript"> '");
HTP.p ("alert ("today runs javascript code!");"
);
HTP.p ("< /script >");
End;
I need to create a pl/sql function that can do alert areas based on an IF condition.
Could someone point me in the right direction? Using dynamic shares the best way forward? I need to trigger on a page element, change the value.Works fine now.
In the javascript code, I changed:get.addParam ('x 01', $v ('P105_PREP_TYPE'));
by
get.addParam ('x 01', $v ('P1_PREP_TYPE'));
P1_PREP_TYPE is the correct name of the element.
Now when I choose the OTHER, 1 message.Concerning
-
Fetch value selection list to select the list using dynamic measurements
Hello
I have a select list 1 and select list 2
as I chooses a 1 based on selected value select list option, select list 2 options screens.
: Options P1_SELECT1
DISPLAY RETURN VALUE OF VALUE
D INTERIOR
INTERNATIONAL I HAVE
: P1_SELECT2 with dynamic statement options
Select NAME, ID from PRODUCT_MAS
where ADDL_FIELD1 =: P1_SELECT1
can I do this task using dynamic measurements?
If so how can I do this?You have even set a dynamic Action for this:
Set as Select list and property 'Cascading LOV Parent article (s)' set of P2_SELECT2 to P1_SELECT1 and you're done. -
Throw the notification of dynamic action.
So I have this code simple PL/SQL that checks to see if a record exists in the database. If it isn't, then it adds the new record to a collection to be used later. If so, I would like to throw a notification so that the user knows that there is. However, I have tried a multitude of thins and cannot operate. Can someone point me in the right direction?
I'm under APEX 4.2.4.00.08.
Here's the code that runs when data was put in the P1003_SLIDE_NUMBER field and pressing the Enter key. The code in bold is where I am wrong. I just want to take a message to let them know that the entry already exists.
DECLARE
NUMBER of existing;
BEGIN
Select count (*)
in existing
of ps_slides
where slide_number =: P1003_SLIDE_NUMBER;
IF existing = 0 and: P1003_SLIDE_NUMBER is not null THEN
() apex_collection.add_member
p_collection_name = > "SLIPS."
p_c001 = >: P1003_SLIDE_NUMBER);
: P1003_SLIDE_COUNT: =: P1003_SLIDE_COUNT + 1;
ON THE OTHER
apex_application.g_notification: = 'this slide exists already.';
END IF;
END;
Hello
You should be able to define the message via
apex_application.g_print_success_message := 'ANY MESSAGE YOU LIKE';
But it shows that if you create a branch to the page itself or any other page (depending on where you want to go) and 'understand the message of success of process' true to this branch.
If above still does not work:
Is you click on the button send the page, or it only executes PL/SQL a DA?
If you do not submit the page that would be an option and the Branch then return to this page again?
Can you set up an example on apex.oracle.com?
Concerning
Bottom
-
Create the cursor using dynamic query
Hello
I declare a query:
l_query VARCHAR2 (32000): = ' select distinct ' | : P_ITEM | "of OCM_CUSTOMER."
How can I assign this cursor query?
I tried, in vain.
Declare
l_query VARCHAR2 (32000): = ' select distinct ' | : P_ITEM | "of OCM_CUSTOMER."
CURSOR l_cur IS l_query;
Begin
.......
End
Thanks for help on this.Hello
You must use a REF CURSOR for that (there are a few examples in the Oracle documentation). Here is a code example:
DECLARE TYPE EmpCurTyp IS REF CURSOR; emp_cv EmpCurTyp; emp_rec emp%ROWTYPE; sql_stmt VARCHAR2(200); my_job VARCHAR2(15) := 'CLERK'; BEGIN sql_stmt := 'SELECT * FROM emp WHERE job = :j'; OPEN emp_cv FOR sql_stmt USING my_job; LOOP FETCH emp_cv INTO emp_rec; EXIT WHEN emp_cv%NOTFOUND; -- process record END LOOP; CLOSE emp_cv; END;
Greetings,
Roelhttp://roelhartman.blogspot.com/
-
drop and re-create the table using dynamic sql
The following procedure should drop the table and re-create it. Currently, I get the dbms_output of the query. If I run the query only, it works well. but through the procedure, it does not work. Please help me
PROCEdure emp_backup is sql_txt varchar2(10000); begin begin EXECUTE IMMEDIATE 'drop table emp_backup ' ; exception when others then null; sql_txt:= 'CREATE TABLE emp_backup as ' || 'select * from emp '|| 'where dep_no=10 ' ; dbms_output.put_line(sql_txt); EXECUTE IMMEDIATE sql_txt; Exception when others then Null; End;
Daniel wrote:
I'm getting following error ORA-01031: insufficient privilegesWhat is the command to grant privileges to this
GRANT CREATE TABLE TO <
> Detaching Frank, however, and echoing my previous comment, let them down and to re-create the tables makes no sense. It is logical to truncate a table if you test a load. If you build a data warehouse, it makes sense to delete and re-create a partition if you rerun a load for a particular date and that you have daily partitions. Deletion and recreation of a table in a stored procedure is not a reasonable way to test a system (nor is there a reasonable way to approach change control issues that will inevitably produce when you need to change the structure of a table).
Justin
Maybe you are looking for
-
Hello friends, I was hoping that the theme I've selected would fill the full screen. Is it possible to do so. Thank you
-
When you use the library of VI SMTP Email I get an error that says my password is incorrect. I don't know what that means I can ensure you that the password is correct, and I'll post the vi with the passwords that the account is single use. I can't
-
RVS4000 Wan does not not after upgrade
Update the Router 1.2.11. Now its imposible to obtain a wan ip address. Reset to factory default, but still no luck. Demotion with rescue utility and everything works again. What is the problem with the more recent 1.2.11?
-
7520 HP Photosmart printer (wireless)
I use Macbook Pro Version 10.9.2 Maverick and using the Silhouette Studio Design Edition of Version 3.0.343 software. Added silhouette scan in the program, but when I click on scan it says no scanner found. I sent Silhouette and they wasn't able to h
-
T610 way BIOS/iDRAC6 firmware update
I inherited two models T610 both version 1.1.4 and iDRAC6 firmware version 1.03.10 BIOS. Is it safe to go with the latest version or is there a recommended update path to get these on most recent firmware?