Forms Builder 6i: Calculated Item-value into DB
Hi all,
I am a Newbie in Forms and have got a problem:
Through a Forms App I want to fill a table in my database. The Form and the table both exist already. One of the Items in my Form is a calculated item, that is calculated with a formula of the values of two other items.
My question is how is it possible to get the calculated value into my table. The only hint I've got is to use WHEN-VALIDATE-ITEM, but I don't know anything about the rest to do...Will somebody help me?
Thanx in advance
Heike
make the calculated item based on the database column you want it to insert the value into.
If this is not possible have a hidden item based on that column and copy the value from the calculated item into this hidden Item. (you can probably use mirror item for this).
Similar Messages
-
How to pass apex item value into custom xml for chart or guage?
Re-opening the old thread : Re: How to pass apex item value into custom xml for chart or guage?
Which was not answered.
Roel - Thanks. Its working - but in a semi quotes in the custom XML
<pointers>
<pointer value= '&P5_RUNNING_TOTAL.'
<label enabled="true">
<position placement_mode="ByPoint" x="50" y="15" />
<format>{%Value}{numDecimals:1}</format>
<background enabled="false" />
</label>
</pointer>
</pointers>This question was helpful for us to resolving one recent thread : AnyChart - set Dial axis intervals dynamically?
(Re: AnyChart - set Dial axis intervals dynamically?
Edited by: P.Ranish on Dec 13, 2012 6:23 AMP.Ranish wrote:
Is there any update for this question ???
Edited by: P.Ranish on Dec 13, 2012 3:36 AMNo, And there won't be in the future.
Please stop posting followup's to old threads, if you have a real problem please search the forum first and post a new question with all information
Roel wrote:
Try using &P5_RUNNING_TOTAL. or #P5_RUNNING_TOTAL#Just to make it clear - this will only work if page is reloaded after setting the item values dynamically via AJAX -
How to change layout of new calculated item values?
Hi,
Is there a way on how to change colours or add a percentage symbol on the values of a calculated items?
I do not want to change the source measures in the criteria area I used to get the calculated items results.
Any idea?
Regards
GiulianoI solved this by using an other approach.
Created a report and filtered the first resolts by certain value. Added a label.
Used combine with similar request and filtered again.
Created so many combines for the number of results I need to filters
In result columns renamed the label with a description which is a common denominator for all the labels
In pivot table, moved the main label to Rows and appled the sum
the reults is below
https://docs.google.com/file/d/0B0nRf4E3yBfpWS1WVjJjbWZyTG8/edit?usp=sharing
Regards
G -
How implement (Forms Builder ) Calculation Item in JDeveloper ADF?
How implement (Forms Builder ) Calculation Item in JDeveloper ADF?
(Forms Builder ) Property
Calculation -> Calculation Mode=Summary
Calculation -> Formula -> Summary Function=Sum
Calculation -> Formula -> Summarized Block=Block Name
Calculation -> Formula -> Summarized Item=Quantity ItemYou can have transient attributes in your VO that do calculations.
http://download.oracle.com/docs/html/B25947_01/bcentities010.htm#BABHGCAH
For summaries here are a few other options:
http://www.freewebalbum.com/blogs/faces/bjanko/blogs.jsp?blog=bjanko20070725180020
http://andrejusb.blogspot.com/2008/01/complex-calculated-values-in-oracle-adf.html -
Checkbox as a query item - how do I get its value into my SQL
I have a search region where the user enters some parameters to filter the records returned from the query. I have a checkbox that represents Active or Inactive. I created it using the APEX_ITEM.CHECKBOX function. So if checked I want the sql to order by Active records else if unchecked to order by inactive records after they press the submit button. So how do I get the checked or unchecked value from this checkbox into my SQL query.
Message was edited by:
ca114422You can have a look here:
http://htmldb.oracle.com/pls/otn/f?p=31517:99
There is an example on how to include various item values
into your query.
By the way, what is your name?
Denes Kubicek -
Set item value at other page via URL-redirect
Hi, I have a button and I want to open a new window with it using an url-target.
</br>
</br>
javascript:window.open ('f?p=&APP_ID.:143:&SESSION.::NO:143:P143_KDT_ID,P143_MESSAGE:&P140_KDT_ID.,&P140_MESSAGE.') </br>
</br>
When I use branching I get an error that there is no page to branch to. I don't understand why. As a workaround I use an url-redirect when the button is pressed, but I'm stuck on getting the current item value into the target page. I tried using $v('P140_MESSAGE') but I can't get the url valid.Jacob,
The problem was that when the HTML for the button is rendered, the value of P1_ITEM from session state was "glued in" to the generated URL at that time. If you then entered a value for the iterm, even though your onChange AJAX technique changed the value in session state it was too late to change the already generated HTML for the button, specifically the URL target for the button.
I created a Set Item2 button on your page with this for the URL attribute:
javascript:window.open('f?p=&APP_ID.:2:&SESSION.::NO::P2_ITEM:' + document.getElementById('P1_ITEM').value);
Let me know if that does what you need.
There is another problem and I don't know the cause. When you click the button, it opens the new window properly but leaves the original page in an error state of some kind. I could not reproduce this in my application using the same js, so I'll be interested in how you solve that.
Scott -
Get back old values into Form Building Application
I have a database trigger that raised an error message when a record is no allowed to change/update. I would like to know how I go back to the old values and reflect these into my application.
I use Oracle Forms Building Version 9.0.2.10.1 (Production) under Window XP system. Below is the database trigger code:
CREATE OR REPLACE TRIGGER "DBDSCHM".AAPT_REVIEWS_BUR
BEFORE UPDATE ON AAPT_REVIEWS
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
Aaap_approved EXCEPTION;
BEGIN
IF (Aapfn_List_Items_Desc(:OLD.AREV_STATUS) = 'APPROVED' AND
:OLD.AREV_CREATED_BY = 'AAPTRF' AND
:OLD.AREV_MODIFIED_BY = 'AAPTRF') THEN
RAISE Aaap_approved;
END IF;
EXCEPTION
WHEN Aaap_approved THEN RAISE_APPLICATION_ERROR(40509,'This Review cannot be modified. '||
'AAP Approved prior to Conversion');
END aapt_review_bur;
SHOW ERRORThanks John, but the proposed of this trigger is to prevent any user to update the records that were loader prior to the Data Loader. That is the reason that this trigger has a condition to compare the old value with the new value. Please, see the syntaxes below:
CREATE OR REPLACE TRIGGER "DBDSCHM".AAPT_REVIEWS_BUR
BEFORE UPDATE ON AAPT_REVIEWS
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
/* This trigger prevents to modify any AAP review */
/* that was already approved PRIOR TO THE Conversion.*/
BEGIN
IF (Aapfn_List_Items_Desc(:OLD.AREV_STATUS) = 'APPROVED' AND
(:OLD.AREV_CREATED_BY = 'AAPTRF') AND (:OLD.AREV_MODIFIED_BY = 'AAPTRF')) THEN
RAISE_APPLICATION_ERROR(-20090,'This Review cannot be modified. AAP Approved prior to Conversion');
END IF;
END aapt_review_bur;
What I really want is that when the above trigger fire and the user receive the raise application message meaning that the user could not updated the record. But the wrong value still show on the form and it will keep getting this error until you put back the previous value. What I really want is to be able to raise the application error and to show back any values that were tried to modify. -
How to fetch the tabular form column value into page items
Hi,
I have created tabular form. I have set LOV for one column. Here my requirement is when i select the value from lov then it will fetch that value into page item.
can any help?
I am using apex 4.1
Thanks
vijayIt's not so easy to make a dynamic action on a tabular form.
The best thing you can do is to use the javascript API from APEX: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm
So if you have a tabular form then open your item and make it a column link.
In the link location select URL.
Your URL would be something like this
javascript:$s('P1_PAGE_ITEM', #COLUMN_ID#);doSubmit('COLUMN_ID');The doSubmit is not required but if you don't submit your page then the server would never know about your page item.
Off course it is possible to submit at a later point. For example you can just use the $s to set the value off an item and afterwards create a button that would submit your page.
Be aware that if you just set the value off your page item and just link to an other page without submitting or without branching that other page would never know about your page item.
If you want the server to know the value off a page item you need to submit it's value to the server. The easiest way is just to do the doSubmit() call after you have set your value.
Hope this helps,
Regards
Nico -
Place value from Forms building in the collection Render Settings.
Hello,
I build a XML form with Forms builder. In one field you can select a <b>project-date</b>. Is it possible to export the the value of this field in a LayoutSet?
I used the standay LayoutSet <b>ConsumerExplorer</b> and would like to place the field <b>project-date</b> in this LayoutSet.
I think you have to do this in the <i>Collection Renderer Settings -> Collection List Renderer Settings -> Displayed Properties.</i>
The extra code that a placed in the Displayed Properties is: rnd:app_date(contentLink.)But still it is not working.
Can someone help me with this or send me a link.
Greetings,
GM
Message was edited by: GemaYes thanks Francois, I know perfectly well how dispatchCustomEvent() and WHEN-CUSTOM-ITEM-EVENT works, but please read the full context to understand what it is, that I actually ask about. Maybe a modification of your code (which is not possible in reality) can better demonstrate what I try to do.
private void dispatchErrors(String message)
log(message);
try{
CustomEvent ce = new CustomEvent(m_handler, THE_TAG_CODE);
m_handler.setProperty(THE_TAG_CODE,message);
returnValue = dispatchCustomEvent(ce);
System.out.println(returnValue);
catch (Exception e)
e.printStackTrace();
}In Forms
DECLARE
eventName varchar2(30) := :system.custom_item_event;
eventValues ParamList;
eventValueType number;
tempString varchar2(100);
returnValue varchar2(200);
BEGIN
IF (eventName='THE_TAG_CODE') THEN
eventValues := get_parameter_list(:system.custom_item_event_parameters);
get_parameter_attr(eventValues,'THE_TAG_CODE',eventValueType, tempString);
select 'Returned from Forms ' || tempString
into returnValue from dual;
return_value_to_java(returnValue);
END IF;
END;Result: the Java console prints "Returned from Forms" + the parameter sent from Java originally.
Does that make it more clear? -
Change item value by process in DML Form: best practice?
Hi,
i have a working DML Form and would like to build an option for choosing values in a popup window and refreshing the page items after closing the popup window.
the DML Form has a button which opens the popup window with
javascript:popUp2('f?p=&APP_ID.:210:&SESSION.', 600, 580)
the popup window has a javascript function under HTML Header
<script language="JavaScript">
function passBack2()
doSubmit();window.opener.doSubmit();window.close();
</script>
and a button which called the javascript function
javascript:passBack2();
while the user chooses a new value and closed the popup window an application item holds the selected value.
the following page rendering of my DML Form use the application item in before header computations to get the new values.
from the developer toolbar's session link i found the values changed by the computation correctly and signed with 'I' but they will not displayed in the page and will not used in the Automatic Row Processing update.
how to accomplish this?
MichaelMichael,
while the user chooses a new value and closed the popup window an application item holds the selected value.
How does that happen, with an after-submit process on page 210?
the following page rendering of my DML Form use the application item in before header computations to get the new values.
All your popup page does is submit itself and then submit the calling page. There is no invocation of the before-header computation on the calling page in this sequence. You should use an after-submit computation.
Scott -
Hierarchical Tree Items question, in Oracle9i forms builder ^^;
Hi,I'm kind of new to using the Hierachical Tree item in Oracle9i Forms builder. so anyway,in the book it was explaining how it's done clearly,but, what I want to do using that item is kind of different;
in the book it has the way of making it like a navigator for the items/fields/tables in the database,either by creating a view for those fields by using Select Statements or using the whole table itself.
however,what I'm trying to do is to have that tree list the names of Forms I have already created and probably the list of Reports I got,so it would sort of like a Menu and I could add a trigger to open the form/report once an item in the tree is double clicked on
here's an example of what I'm talking about :
http://i7.photobucket.com/albums/y264/_Crzy_Chck_/Htree.jpg
sorry the screen shot isn't the best ^^;
that's from a company my friend works at,they have that tree as a menu for their forms and reports,once u double click on a form name or a report,it opens up ^^;
I tried google/yahoo,I got the same info I found on the book.Or you may want to check out this code:
PROCEDURE next_menu(
menu_in IN OUT NUMBER
, master_menu_in IN NUMBER
, master_name_in IN VARCHAR2
, context_menu_in IN VARCHAR2
, node_in IN ftree.node
, no_rows_out IN OUT BOOLEAN )
IS
CURSOR c_menu(
b_master_menu NUMBER
, b_prev_menu NUMBER
, b_context_menu gba_tpivmnu.kmenu%TYPE )
IS
SELECT p.ofnk MASTER
, m.ofnk
, m.napp || m.kfnk_sub napplus
, m.rid
, m.rid_mas
FROM gba_tpivmnu p -- parent menu
, gba_tpivmnu m -- menu
WHERE m.rid_mas = p.rid
AND m.kmenu = b_context_menu
AND (
m.rid_mas = b_master_menu
OR ( b_master_menu IS NULL
AND m.rid_mas IS NULL ) )
AND ( m.rid > b_prev_menu
OR b_prev_menu IS NULL )
ORDER BY m.rid;
r_menu c_menu%ROWTYPE;
l_prev_menu tmenu.kode%TYPE;
l_teller PLS_INTEGER := 0;
new_node ftree.node;
this_node ftree.node;
tree_itm item := FIND_ITEM( tree_item );
l_top_node_name VARCHAR2( 512 );
BEGIN
IF master_menu_in IS NOT NULL
THEN
IF node_in IS NULL
THEN
/* eerste keer, dus dit wordt de bovenste node */
l_top_node_name := master_name_in;
glob.set_current_menu( context_menu_in );
new_node :=
ftree.ADD_TREE_NODE(
tree_itm
, ftree.root_node
, ftree.parent_offset
, ftree.last_child
, ftree.expanded_node
, master_name_in
, 'favorites'
, master_menu_in );
END IF;
LOOP
r_menu.rid := NULL;
OPEN c_menu(
master_menu_in
, l_prev_menu
, context_menu_in );
FETCH c_menu
INTO r_menu;
CLOSE c_menu;
l_teller := l_teller + 1;
l_prev_menu := r_menu.rid;
EXIT WHEN r_menu.rid IS NULL;
this_node :=
ftree.ADD_TREE_NODE(
tree_itm
, NVL( node_in, new_node )
, ftree.parent_offset
, ftree.last_child
, ftree.expanded_node
, r_menu.ofnk
, NULL
, r_menu.napplus );
next_menu(
menu_in => menu_in
, master_menu_in => r_menu.rid
, master_name_in => r_menu.ofnk
, context_menu_in => context_menu_in
, node_in => this_node
, no_rows_out => no_rows_out );
END LOOP;
IF l_teller = 0
THEN
no_rows_out := TRUE;
END IF;
IF l_top_node_name IS NOT NULL
THEN
set_tree_item_top_node( l_top_node_name );
END IF;
END IF;
END next_menu;tree_item contains the name of the tree item you are using. the select statement is based on a table that is like EMP, where one EMP van be another EMP's manager. In this table a menu-option can be another menu-option's master.
this is a recursive function that keeps calling itself untill the query finds no more record.
Good Luck! -
Calculated item doesn't show values
Hi!
I have created a report in which I'm showing number of vacancies for two different months (depending uopn the values of months selected in the parameter). I have created a calculated item in Desktop that is supposed to give me difference between the values for both months. In other words, this calculated column is supposed to show me if there is any increase or decrease in the number of vacancies.
The datatype for values for both months is 'number'in the database and I've set it as 'default' in my report...and my report displays them correctly. However, when it comes to the calculated column, no values get displayed. I tried to experiment with the datatype for this column...like set it to 'none', 'default', number etc. But, no success! I tried to experiment with the datatype of the other two columns (values for months) as well...like setting them as 'number', however, this too brings no success!
I don't think that this has anything to do with the joins as the other sheets in the same workbook display correct data with totals too.
Can someone help me on this?
Thanks and regards,
Aparna
Message was edited by:
AparnaHi !
Let me post my calculations here: I'm giving them here in logical order.
1) Total = No Female Required SUM+No Male Required SUM+No Mixed Required SUM
Here 'No Female Required SUM' and the other two are from a table in the database. Puppethead, answer to your question: these three columns are from the same table and thus, form part of the same folder and BA. Their datatype in the db table is specified as 'Number'.
And this calculation is supposed to give me total of vacancies whether for female candidates or male or for those where no sex is specified.
Please note that problem persists even if I select 'details' instead of 'sum' as aggregation for all the three columns.
Please note that I do not directly display this calculation in my report.
2) Month 1 Vacancies = CASE WHEN ( "Month" = :From month ) THEN Total END
This is where I reference the Total that I create before. Here I'm also using 'Month' which is created based on a date using Hierarchy functionality in Administrator. From month is a parameter. Thus, the Total that I display should be for the month that the user selects as a parameter value.
This column 'Month 1 Vacancies' displays correct values.
3) Month 2 Vacancies = CASE WHEN ( "Month" = :To month ) THEN Total END
Same logic as calculation no. 2. Please note that this column too displays values correctly. To month is a parameter.
4) Change = "Month 2 Vacancies"-"Month 1 Vacancies"
What I would like to see here is the difference (whether positive or negative) between the vacancies for two months. This column is displaying nothing. And that's where the problem lies.
Please note that all the four calculations are being created in the Desktop while creating the report.
Could you please advise me?
Thanks and regards,
Aparna -
Form builder IZ(item)m]W vZ
] form builder LjBJ(item),%?IJ,@
d
s]?\夠m6|?I./BmwhWvZ(v.W: :TEST.NUM02+:TEST.NUM03 =v.dBXh6). BI?s\6|.Hi John,
for the process of time dependent publishing look here: http://help.sap.com/saphelp_ep60sp2/helpdata/en/e8/a9a76828b8dc469969ff450ec81ced/frameset.htm
I just also tried to bind the VALIDFROM and VALIDUNTIL properties to some input fields within a form of the form builder, but it seems to be a question of the right timestamp format (which I don't know). Every time I try to put in some values, they are not accepted and the fields are rendered in red...
Nevertheless, hope it helps
Detlev -
Spaces removed when inserting a value into a text item
Dear members,
(Forms 6i c/s)
I have a databased function returning a string of characters (varchar2). This value can have spaces at its end.
When I put this value into a text item in Forms, the spaces at the end are removed.
How can I avoid that ?
Thanks for your help.Hi,
There is no elegant solution for this. Metalink has a discussion of the topic in note nr 247715.1
/Michael -
i want to store the data form the PWM and the value of the changing duty cycle into a file simultaneously and continually but having problem.Please can anyone help out.
Attachments:
data.vi 60 KBHello,
Have you looked at the "Write Binary File.vi" and "Read Binary File.vi" examples?
They give you a good clue as how to write and read arrays to and from binary files.
For your data it means that you could put the two data items to write in an array and write the array to file, for the read its important to in what sequence the number were written to file.
Kind regards,
André
Regards,
André
Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)
Maybe you are looking for
-
Credit Memo with reference to Sales Order
Dear Friends, I am trying to configure customization for the new billing document type (Credit Memo) with reference to an existing sales order, and i want the new billing type also to be listed in the billing due list when we create the invoices with
-
SOA Suite 11g and its compatibility with Weblogic
Hi , I have two questions: 1. From where do I download the SOA Suite 11g --Link to the download? 2.If SOA suite 11g can be installed on weblogic. I understand that SOA suite 10.1.3.4 is compatible with weblogic 9.2 but need some inputs on the SOA Sui
-
Handling a very larger file from Sender system
Hi Sdn, Can you please tell me, what should be done from an SAP+XI side to handle a very large file coming from the sender system to be posted to the receiver? What should be done in XI end so that there is no problem in handling the larger file. Tha
-
XSQLPages does not handle 'Expect: 100-continue'
I am running Jigsaw2.0.5 (from W3C) and XSQLPages1.0.2. When posting messages using libWWW (from W3C), an 'Expect: 100-continue' is included in the HTTP/1.1 header allowing the server to respond with a '100-continue' before the body of the message is
-
If email has a PDF attachment, I can't read the text portion of the email
I noticed that if the message had a PDF attachment, then that icon is all I see. The text portion seems to have been ignored, although I can see it in the "preview" of the message. Very strange. Rgds Ken