Default value type - validation option form based on stored procedure
Please could somebody explain and provide an example of what the option :-
default value type - in the validation options for a field in the editor for a form based on a stored procedure ?
Thanks in anticipation.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dmitry Nonkin([email protected]):
Absolutely, you can use SQL query to return the value like in the example above:
Default Value = select 5 from dual
Default Value Type = 'SQL query returns number'
or
Thanks,
Dmitry<HR></BLOCKQUOTE>
Hi,
and what about:
Default Value = select max(salary) from emp_salaries
Default Value Type = 'SQL query returns number'
Will it work? We go some troubles with this.
Thanx
Marcin
Similar Messages
-
RAISING EXCEPTION AND SHOWING TO USERS IN FORM BASED ON STORED PROCEDURE
I have a form based on stored procedure.
I want to handle exceptions in the stored procedure and show it to users.
Here is what i want to do.
I have a sku# field in the form and i want to validate it(against the database
table) in the procedure before inserting into the database.
I want to give a message to users when the validation fails.
How is this possible with the forms based on stored procedure?
Can i use javascript to do the same?
Thanks in AdvanceI have a form based on stored procedure.
I want to handle exceptions in the stored procedure and show it to users.
Here is what i want to do.
I have a sku# field in the form and i want to validate it(against the database
table) in the procedure before inserting into the database.
I want to give a message to users when the validation fails.
How is this possible with the forms based on stored procedure?
Can i use javascript to do the same?
Thanks in Advance -
Help: FORMS based on stored procedures
I am working on a FORM based on stored procedures. This particular FORM performs a query and generates say,
customer_name, item1_sale, item2_sale and sum of the item1_sale and item2_sale.
I'd like to know if there are ways that the query procedure returns to reference cursors that one with multiple records and one with the sums? The FORM will then be able to show rows of sales and the bottom row with show the sale totals.
Thank you in advance.
JimmyFrancois,
I just tried another way of getting the totals. I manually created a data block and add two items tot_1 and tot_2. I the item properties: I set calculation:
calculation Mode: Summary
Summary Function: Sum
Sumary Block: BLOCK_A
Summary Item: item1_sale etc.,
I got a compile error:
FRM-30377: Summary item must reside in single-record block or in same block as summarized item.
Where do I catch this error?
Thanks.
Jimmy -
Would like to create a file upload facility in a form based on stored procedure
Hello,
I would like to create a 'File Upload' in a 'form based on stored procedure'. The version of portal that I am running is 3.0.7.6.2. In this version, only 'form based on table' has the ability to upload files. Or is it that I am missing something?
Please let me know if this is possible in higher versions of portal.
Thank you for your help.
JayasreeI have kin od fdone this by using the additem fucntion, if you look at the HTML of the add file page, you can see the parameter that are required for the form.
-
Help: FRM-40505 for a FORM based on stored procedures
Hi,
I am working on a FORM based on stored procedures. When it performs a query, it actually returns record, but still comes with the message FRM-40505: ORACLE error: unable to perform query. Any recommendations on the possible coding area to check?
Thank you in advance.
JimmyJimmy,
To base a block on a stored procedure is not a simple task because it depends on the .....
.... stored procedure !
If you do not provide much information (like the famous stored procedure), we could not do anything for you.
As much information you provide, as much chance we have to understand the problem.
Francois -
Problem passing OUT parameters form based on stored procedure to another form?
Hello,
I am unable to pass parameters of type OUT from a form based on a stored procedure to another form.
However, I am able to pass parameters of the type IN to the other form.
This is the code that I have under the heading
On successful submission of a form, execute this PL/SQL block or PL/SQL procedure:
declare
v_partno varchar2(100);
v_partdesc varchar2(200);
blk varchar2(10):='DEFAULT';
v_names varchar2(1000);
v_values varchar2(1000);
begin
v_partno:=p_session.get_value_as_varchar2
(p_block_name=>blk,p_attribute_name=>'A_PART_NO');
v_partdesc:=p_session.get_value_as_varchar2
(p_block_name=>blk,p_attribute_name=>'A_PART_DESC');
v_names := '_moduleid:_show_header:pnumber:pdescription';
v_values := '1325575336:YES:' || LTRIM(TO_CHAR(v_partno)) || ':' || LTRIM(TO_CHAR(v_partdesc)) ;
PORTAL.wwa_app_module.link (
p_arg_names => PORTAL.wwv_standard_util.string_to_table2(v_names),
p_arg_values => PORTAL.wwv_standard_util.string_to_table2(v_values));
end
Info:
1. Passing PART_NO (IN parameter) and PART_DESC (OUT paramter) to another form.
2. After hitting the submit button, the second form comes up, but with only the PART_NO(type IN) field completed. The PART_DESC(type OUT) field did not get passed to the second form.
3. The corresponding fields in the second form are pnumber & pdescription.
4. FYI - I can see all the OUT parameters correctly, if I don't try to pass control to the second form.
5. Portal 9.0.2 ( the version that ships with IAS 9.0.2)
Any help would be greatly appreciated. I have been stuck here for a while now!
DevRe: Error
Passing OUT parameter to another form.
You cannot retrieve the value of the OUT parameter from the session object because after executing your procedure,
the value passed out using the OUT parameter is not loaded in the session object.
But you can still achieve what you are trying in the following way.
Let's assume that your procedure has the following str :-
procedure proc1 (p_in in varchar2,
p_out out varchar2)
is
begin
/* your processing statements
end;
Say, the name of the field, in the 2nd form, where you need to pass the out parameter value is VALUE_FROM_OUT.
1> Edit the form on procedure proc1
2> Select the submit button in the left frame and for the PL/SQL button handler choose Submit action.
3> In the adjacent textarea, comment out the doSubmit statement and use code given below :-
declare
l_p_in varchar2(32767);
l_p_out varchar2(32767);
l_url varchar2(2000);
begin
l_p_in := p_session.get_value_as_varchar2(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_P_IN');
execute immediate
'begin <schema>.proc1(:b_in,:b_out); end;'
using in l_p_in, out l_p_out;
l_url := 'http://<host>:<port>/pls/<dad>/<portal-schema>.wwa_app_module.link?p_arg_name=_moduleid&p_arg_values=<module_id>&p_arg_names=VALUE_FROM_OUT&p_arg_values='||
<portal-schema>.wwv_standard_util.url_encode(l_p_out);
<portal-schema>.wwa_app_module.set_target(l_url,'CALL');
end;
NOTE :
======
In the code given above, replace
<schema> with the schema name that owns the procedure proc1
<host> with webserver host
<port> with the port of your webserver
<dad> with the portal dad
<portal-schema> with the name of the portal-schema
<module_id> with the module of the 2nd form i.e. where you need to pass the value of the out variable.
You will have to grant execute privilege on procedure proc1 to your application schema,
if the procedure proc1 lies in a schema other than the application schema.
4> Finish editing the form. -
Adding fields to a form based on stored procedure
I have a store procedure and a form based on it. I'd added a new parameter to the store procedure. How can I do to add a field in the form which takes the new parameter. I'd tried adding a new field with the same name of the parameter but it didn't work.
ThanxHi,
It should work fine. What is the problem you are facing? Are you getting any error?
Thanks,
Sharmila -
Form Based on Stored Procedure
I have an application (STAR_PORTAL) that is owned by the 'STARS3' schema. I want to create a form based on a stored procedure. The procedure ('select_empname') is stored in a package ('star_portal') that is owned by the portal30 user. When I get to the point where I link the form to the procedure, it does not see it. I have tried granting execute on star_portal to public and stars3.
We will checkup this issue why you do not see the procedure (most probably because it is a packaged procedure).
Meanwhile, you can continue creating the form by typing in:-
portal30.star_portal.select_empname
where you need to specify the procedure name. -
Hi! All,
I'am using Oracle portal
In the form wizard there is an option for using 'defalt value' for any text fiels along with 'defult value type'. I want to know how effectively I can use sql query function written by me or any sql query .And from where can I get the details about this.
till now I can only used #sysdate in the default value.Also what # denotes.
Please do help me
Thakns in advance.
Regards
Anil RathTry these:
1)Default Value = select schema_name.your_function from dual
Default Value Type = Expression that returns Date
2)Default Value = select sysdate from dual
Default Value Type = Expression that returns Date
3) #Sysdate
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Swati Kale ( ):
do you mean to say that, if my function name is returnDate and the owner of the function is xyz.
Then in defualt value,I shd give,
xyz.returnDate
and in Default value type,I shd select
Function returns date.
advise<HR></BLOCKQUOTE>
null -
Setting a Default Value within a Tabular Form
Hi All,
Using Apex 2.2.1
Hoping someone can assist. I have the following two scenarios where I would like to set a default value to a column within a tabular form.
Scenario One:
Prior to actually displaying the tabular form on the page, I have a region on this page where I ask the user to select a Application No. first (using a Select List with Submit). Once this item, say P50_APP is set to a value, the Tabular Form region is then presented to the user by where I then allow them to enter certain information required using the 'Add Row' button. One of the columns within this tabular form also represents the Application No.
My questions are:
a) I have made the Application No. within the tabular form as a LOV, so when the user hits the 'Add Row' button, how can I set the initial value to P50_APP value using the 'Default Type and Default' items within the column?
b) Since I am trying to achieve a master-detail type scenario here, if (a) above is not possible, if I hide the Application No. column within the tabular form, how can I set it to P50_APP when the user presses either the 'Add Row' or 'Submit' buttons?
Scenario Two:
Is it possible to pass a value from a tabular form, i.e a column within this tabular form on one page, to another tabular form column on a another page (when the user presses the 'Add Row' button) within the same application?
For example, on page 50 I have the column #APP_NUMBER# passed onto page 60 which is another tabular form that also holds the same column name #APP_NUMBER# , so when the user on page 60 hits the 'Add Row' button, I would like the App Number column default to the one just passed over from page 50.
Is this possible?
Apologies if I am asking the same things in both scenarios - just want to make sure I understand MRUs.
Thanks.
Tony.Hi Andy,
Thanks for getting back to me but I think you are referencing these default values in the wrong section.
What I am actually trying to set is the value of a column within a tabular form to P50_APP and it seems to me that the only available options for setting default values on a tabular form column are by using:
Default Type: which can be one of:
No Default
Item (application or page item name) or
PL/SQL Expression or Function
and then actual source is set against:
Default:
Unsure as to how to actually set the value of P50_APP which is in session to the individual tabular column mentioned above.
FYI, I have tried selecting for Default Type: Item (application or page item name) and then specifying for Default:&P50_APP. as well as Default Type:PL/SQL Expression or Function and specifying for Default: :P50_APP but to no avail.
Tony. -
Providing Default values to Select-Options in WD ABAP
Dear Experts,
Using reusable component WDR_SELECT_OPTIONS im able to create select-options successfully ... I need your guidance to provide default values(type date) on the same select-options.
Thanks a lot.
Regards
Siva Mandapudi.I do not see the relevance of this thread to FPM. Please follow this thread for your solution.
[Default the value in Parameter in wdr_select_options|Default the value in Parameter in wdr_select_options] -
How to set the default values for print options
Hi all,
We can set the default value for print options, just like Logical destination、numbers of messages、print immediately and so on, so where we should to maintain these default?Hi Sandy,
This can be done by an abaper by making changes in the driver program. The Driver program feeds all the data which u have mentioned for printing.
if the driver program is standard. copy to an z type and make modification on printer settings on the driver program code.
this will surely solve the issue.
Regards
Gunaseelan -
Default File Type for New Forms - How to change?
Hi,
How can I change propperty: Default File Type for New Forms?
It is enabled! Do I have to be Administrator to change it? I have SAP ALL..
SFP -> Layout -> Tools --> Options -> Document Handling
tnx, Adibo.There is no authorisation required for changing the file type. You are saying its enabled, then you can change it.
Edited by: Nikhil Poojari on Aug 28, 2009 6:50 AM -
SQL query returns varchar - default value type!!!
On a field in my portal form there is a default value type of 'SQL query returns varchar', where can I put this sql to get a default value from a table?
Hi again
I have this code in 'additional pl/sql code' - '...before displaying the page'. But it comes up with an error when I run the form.
declare
prop_v varchar2(20);
group_v varchar2(3);
el1_v varchar2(3);
blk varchar2(10) := 'DEFAULT';
begin
prop_v := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'l_property_p');
group_v := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'l_group_p');
select element_code
into el1_v
from eh_risk_element_detail
where property_ref = prop_v
and group_code = group_v
and line_no = 1;
p_session.set_value(p_block_name => blk, p_attribute_name => 'L_ELEMENT1_P', p_value => el1_v);
end;
Rich -
How to assign list of default value for select-option variable???
Hi every one
This is Deepak,
I want to know how to assign list of default value to select-option variable ? please any body tel me solution
for example
select-option matnr for mara-matnr default ..............and here i want to give more than 1 values that will be default value and use can choose any one at the time of input .
Thank you in advance
DeepakHi.
Check the following sample code.
REPORT ztn_test.
" It is example for list populating.
TABLES:knvp.
data: BEGIN OF itab OCCURS 10,
kunnr like knvp-kunnr,
END OF itab.
data: wa_itab like itab.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: s_kunnr(20) type c as LISTBOX VISIBLE LENGTH 40 .
AT SELECTION-SCREEN OUTPUT.
SELECT kunnr from knvp into CORRESPONDING FIELDS OF TABLE itab WHERE parvw = 'SP'. " SP for ur requirement
" I have used loop to populate some values from table
loop at itab into wa_itab.
name = 'S_KUNNR'.
value-key = sy-tabix.
value-text = wa_itab-kunnr.
append value to list.
clear wa_itab.
endloop.
" If u want individaully assign the values change the code as
name = 'S_KUNNR'." Select option name
value-key = 1." Index
value-text = 'VAL1'.
append value to list.
name = 'S_KUNNR'." Select option name
value-key = 2." Index
value-text = 'VAL2'.
append value to list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = name
values = list.
Edited by: tahir naqqash on Feb 21, 2009 4:38 PM
Maybe you are looking for
-
[回答内容] はい.IT 管理者は.カスタマイズしたデプロイメントパッケージ(業界標準の MSI および PKG ファイル)を無料の Creative Cloud Packager で作成することで. クリエイティブアプリケーションおよびアップデートのデプロイメントをコントロールできます. 新しい Adobe Enterprise Dashboard では.組織内のどのユーザーとグループがクラウドストレージおよびサービスにアクセスできるかを IT 管理者がコントロールできます.
-
In delivery - Header- Administration-Sales office is blank.
Hi Gurus Please help as I am not getting entries updated in LIKP-VKBUR (Sales office in case of deliveries). So In every Delivery--Header-Administration--Sales Office is blank. I have checked the following: 1. Sales office entries are maintained in C
-
Hi all, I just purchased a new 13" MBP and a 23" Dell display to go along with it. The display runs at HD resolution (1920x1080), and I have it connected to my computer via DVI. However, the image looks a little fuzzy, and fonts, especially small one
-
What do you do if your computer on startup goes to a black screen with the message "Darwin/BSD + (computer name)"?
-
Problem: DLL using fclose doesn't close file unless exit Labview completly
Hello, Do I have more than one option to do this correctly? I do not want to be forced to stop and start my Labview application every time I want to close a file. Thank you, Christopher Lusardi