How to interpret a formula stored in a transparent table

Dear all,
I have filled in a specific transparent table with some formula. I would like to read the table, find the formula and take the result of this formula in a variable
In my table :
Country, formula 1, formula 2
FR, P + 1 ( 1 / 80 ), R * 1 ( 1 - 30 )
In my program,
I read the table with the country as key, and I would like, first to replace the P and R by a value in the program, and I would like  to interpret the formula and put the result of this in a variable
if Country = FR
replace P by w_price in formula1
replace R by w_tva in formula2
w_result1 = formula1
w_result2 = formula2
I don't know how to do interpret these 2 statement like :
w_result1 = w_price + 11 ( 1 / 80 )
w_result2 = w_tva  * 1 ( 1 - 30 )
I tought to use the field symbol and assign but w/o success for the moment
Can anybody help me ? it is very important.
Thanks
Kind regards
Véronique

Hello,
I think my questions was not so clear.
In fact, the formula is in a field in a transparent table
for example : my_table has a field my_formula. In this field I have written:   P + 1 ( 1 / 80 )
I need to interpret the content of the field my_formula to solve the formula and put the result in a variable.
I don't want to write the formula directly in the program
thanks
Véronique

Similar Messages

  • How do I redirect formula links in a duplicated table?

    I am putting together an annual accounts spreadsheet in Numbers. I have several worksheets with a set of tables for the first month. The final worksheet contains a summary table which gathers data from across all the tables on the other sheets. No problem so far. But when I create a new set of tables for the second month I also duplicate the summary table. Now all the values are still drawn from the first month tables. How can  I redirect all the formulas to the second set of tables? Is this possible?
    If this sounds a bit confusing, this is what I am trying to do by way of simple demonstration;
    I create Table A (January) in Worksheet 1
    I create Table B (January Summary) in Worksheet 2 - this contains formulas drawing information from Table A
    I duplicate Table A in worksheet 1 to make Table C (February) - and overwrite the cells with new data values. Table C remains in worksheet 1
    I duplicate Table B in Worksheet 2 to make Table D (February Summary). Table D remains in Worksheet 2. However, all the data values are still drawn from Table A (January). I now want them all to point to Tabel C (February) without having to manually re set all the formulas.
    There doesn't appear to be a one command way of doing this. Nor can I double click the cell formulas and type in a simple change - it seems I have to start the formula set up all over again.  Any help would be appreciated - even if it is bad news! I'm quite new to Numbers - but finding my way around!
    Many thanks

    Hi John,
    Rather than struggling with so many separate tables and formulas, which sounds unwieldy and error-prone, have you considered entering your data in one table and extracting monthy summary statistics and views as needed?  For example you could have something like this:
    The Purchases Data table contains only data you enter. There are no formulas there.
    There is only one formula in the Summary table, here copied from B2 across and down:
        =SUMIFS(Purchases Data::$D,Purchases Data::$B,$A2,Purchases Data::$C,B$1)
    Granted, it's an indimidating-looking formula. But if you look up SUMIFS in the function browser you'll see how it works. It's much easier than it looks.  The first argument within the () is the column you want to sum. The other arguments are column-condition pairs, where each condition applies to the column just before it.
    So the formula here in B2 is saying, add up all the numbers in column D of the Purchases Data table (the first argument) where the value in column B of the the Purchased Data table is the same as the value in A2 of the Summary table (the first column-condition pair) and the value in column C of the Purchases Data table is the same as the value in B1 of the summary table (a second column-condition pair). You can add more column-condition pairs as needed.
    Using this approach you can also quickly extract monthly summary tables.  In this simple example, you set one up and get it working for the first month, then copy/paste the whole table, change its name and the month number in A1 and you're done. No need to further fuss with formulas:
    Formula in B2, copied to C2:  
          =COUNTIFS(Purchases Data::$B,$A$1,Purchases Data::$C,B$1)
    Formula in B3, copied to C3:  
          =SUMIFS(Purchases Data::$D,Purchases Data::$B,$A$1,Purchases Data::$C,B$1)
    Then, say, you want to list all the Cafe purchases in January, you simply apply a filter to the Purchase Data table like this:
    SG
    P.S. Sharing via iCloud here is easy:
    Copy the link, click the in the editor and paste it in.

  • How to create a view on a Non-Transparent Tables.

    Hi,
    i want to create a view on P0001 & P0002 tables.
    these two tables are non transparent.
    Can any body help me ,
    Thanks in Advance,
    Regards
    Vinay

    Hi Vinay
    It seems you program HR-ABAP. Generally it is not required to create views since we use LDB (Logical database) utilizations in our programs. Doesn't it satisfy your requirement? Or is it required at somewhere you do not use LDB?
    *--Serdar

  • How to delete a key field in a Transparent table

    Hi,
    I have created a Transparent table Zemployee in which there are 4 fields ( id, name, job, hiredate). I intend to make primary key consists of 2 fields (id, name) but by mistake I have included job field as well.
    Now I want to change job field from a key field to non-key field, I use SE11 to display the maintainance of the Zemployee table, unmarked the key label column on job field then I save and activate the table but the system fail to activate the Zemployee table.
    So now, what shoul I do to solve this problem ?
    Thanks,

    Hi,
    I have tried again and it work well ( use SE14 as you talk). and now I make job field become key-field again and use se11 to change it to non-key field and it work well too. So I think the problem maybe at the network or somethings else.
    Thanks and regards,

  • How can we find formula function in Payroll Formula

    Guys,
    As far as concern regarding oracle functionality is very vast in particularly in payroll process, mostly functions are built-in to avoid user to create any custom code, but it is not fully covered business requirement. Therefore we need to create our custom function to cover/validate our business need and for this purpose we register this function in formula function, that is the easiest way to add any condition in payroll formula by calling this. Now my requirement is that to find formula name where this function has been used.
    Let's suppose any of user is created “X” formula through this functionality and called in payroll formula’s how can we find formula name wherever this function has been called.
    Please suggestion

    That's a good question. Fast Formula text is stored as a LONG data type which is now a deprecated data type. You can write a PL/SQL utility function to convert the text to a VARCHAR2 and search that but that has two problems:
    1) It assumes you have permission to create a function, which isn't something you'll likely have on a production database
    2) It'll barf for any formula in excess of 32760 bytes
    You can also use the to_lob function to copy the contents of ff_formulas_f into a new table (with a CLOB data type) and then create an Oracle text index to quickly search the CLOB. But again that assumes you have write access.
    If you're patient then you can also run this hideous piece of SQL:
    SELECT ff.formula_name
    ,ft.formula_type_name
    ,src.text source_plsql
    FROM ff_formulas_f ff
    ,ff_formula_types ft
    ,ff_functions fff
    ,all_source src
    WHERE ff.business_group_id IS NOT NULL
    AND ff.formula_type_id = ft.formula_type_id
    AND src.name = 'FFP' || to_char(ff.formula_id) || '_' || to_char(ff.effective_start_date, 'DDMMYYYY')
    AND src.type = 'PACKAGE BODY'
    AND lower(text) like '%' || lower(fff.definition) || '%'
    AND trunc(sysdate) BETWEEN
    ff.effective_start_date AND ff.effective_end_date
    AND upper(nvl(fff.alias_name, fff.name)) = upper('XXC_MY_FFFUNC');
    (replacing 'XXC_MY_FFFUNC' with the name of the Fast Formula Function you wish to search). Don't expect it to be fast. What this does is search the generated PLSQL rather than the source formula text. This only looks for customer-defined Fast Formula (those with business_group_id set).

  • How to add records or how to maintain list in stored Procedure

    Hi,
    I am facing an issue in the addition of record in the type
    create or replace
    TYPE               "PROD_SEARCH_COUNT_TBL"                                          AS TABLE OF PROD_SEARCH_COUNT_OBJ;
    create or replace
    TYPE               "PROD_SEARCH_COUNT_OBJ"                                          AS OBJECT
    ( /* TODO enter attribute and method declarations here */
        V_Name Varchar2(500 Byte),
        v_Value Varchar2(500 Byte),
        v_count Number
    I want to add records to the type I tried following way
    prod_wcf_rec PROD_SEARCH_COUNT_TBL;
      SELECT PROD_SEARCH_COUNT_OBJ('Name1','Value1',1) BULK COLLECT INTO prod_wcf_rec FROM DUAL;
        SELECT PROD_SEARCH_COUNT_OBJ('Name2','Value2',2) BULK COLLECT INTO prod_wcf_rec FROM DUAL;
        SELECT PROD_SEARCH_COUNT_OBJ('Name3','Value3',3) BULK COLLECT INTO prod_wcf_rec FROM DUAL;
        SELECT PROD_SEARCH_COUNT_OBJ('Name4','Value4',4) BULK COLLECT INTO PROD_WCF_REC FROM DUAL;
    DBMS_OUTPUT.PUT_LINE ('-----------------------------Looping----------------------------');
    FOR i in 1 .. prod_wcf_rec.COUNT
    LOOP         
    DBMS_OUTPUT.PUT_LINE (prod_wcf_rec(i).V_Name||' - '||prod_wcf_rec(i).v_Value||' - '||prod_wcf_rec(i).v_count);     
       END LOOP;
       DBMS_OUTPUT.PUT_LINE ('-----------------------------Looping----------------------------');
    In printing I am getting last records only .So is there any way to add records to PROD_SEARCH_COUNT_TBL
    How to add records or how to maintain list in stored Procedure

    Every time you BULK COLLECT into a collection type the value is overwirtten. So you need to try something like this.
    SQL> create or replace type prod_search_count_obj as object(v_name varchar2(500 byte), v_value varchar2(500 byte), v_count number)
      2  /
    Type created.
    SQL> create or replace type prod_search_count_tbl as table of prod_search_count_obj
      2  /
    Type created.
    SQL> declare
      2    prod_wcf_rec prod_search_count_tbl;
      3  begin
      4    select obj_val
      5      bulk collect into prod_wcf_rec
      6      from (
      7            select prod_search_count_obj('name1','value1',1) obj_val from dual
      8            union all
      9            select prod_search_count_obj('name2','value2',2) from dual
    10            union all
    11            select prod_search_count_obj('name3','value3',3) from dual
    12            union all
    13            select prod_search_count_obj('name4','value4',4) from dual
    14           );
    15
    16    dbms_output.put_line ('-----------------------------looping----------------------------');
    17    for i in 1 .. prod_wcf_rec.count
    18    loop
    19      dbms_output.put_line (prod_wcf_rec(i).v_name||' - '||prod_wcf_rec(i).v_value||' - '||prod_wcf_rec(i).v_count);
    20    end loop;
    21    dbms_output.put_line ('-----------------------------looping----------------------------');
    22  end;
    23  /
    -----------------------------looping----------------------------
    name1 - value1 - 1
    name2 - value2 - 2
    name3 - value3 - 3
    name4 - value4 - 4
    -----------------------------looping----------------------------
    PL/SQL procedure successfully completed.
    SQL>

  • How to get a formula from the user from a text box in a webpage

    Hi. I would like to know how to get the formula from the user who enters in a textbox. This formula can have any number of variables starting with a and goes on.
    The complexity of the formula can go upto sin, cos, ln, exp. Also user enters the minimum and maximum values of these variables. Based on a specific algorithm (which I use) I would calculate a *set of values, say 10, for each of these variables, substitute in the formula and based on the result of this formula, I select ONE suitable  value for each of the variables.
    I don't know how to get this formula (which most likely to be different each time) and substitute the values *which I found earlier.
    Kindly help me out in this issue.
    Thanks

    The textbox is the easy part. It's no different than getting a String parameter out of an HTTP request.
    The hard part is parsing the String into a "formula" for evaluation. You'll have to write a parser or find one.
    Google for "Java math expression parser" and see what you get.
    Or write your own with JavaCC.
    %

  • How to select from a stored procedure?

    Lets say I have a simple stored procedures
    Create Procedure stp_test
    As
    Begin
     Select * from tbl1
    End
    Go
    I would like to be able to do this in SSMS (actually, I want to do this from ADODB)
    Select top 10 * from ...stp_test... Order By rowID
    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    Rich P

    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    If you want to use the OPENQUERY method , use the following.. follow this link...
    http://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • In VB Programming code -- How to access the formula for suppressing a field

    In VB Programming code -- How to access the formula for suppressing a field
    I am using Crystal Reports 2008 v1
    Using VB code, I am attempting to modify a Crystal Report before exporting it into a PDF format and then displaying it on the Web.
    My problem is that I am unable to access the formula used to dynamically suppress a field.
    The following code is working:
    mySections = rd.ReportDefinition.Sections
    For Each mySection As CrystalDecisions.CrystalReports.Engine.Section In mySections
       ' myFieldToChange is a String set to the text of the field I need to adjust the Suppression
       iloop = 0
       For Each RecObj As CrystalDecisions.CrystalReports.Engine.ReportObject In mySection.ReportObjects
               If mySection.ReportObjects.Item(iloop).Name.ToLower = myFieldToChange Then
                   myTextObject = CType(mySection.ReportObjects.Item(iloop), CrystalDecisions.CrystalReports.Engine.TextObject)
                   myTextObject.Text = "new field text goes here"
                   mySection.SectionFormat.EnableSuppress = True
                   '  Here is where I want to change the formula for the Suppression
                End if
                iloop = iloop + 1
        Next
    Next
    I can not find any reference to the actual suppression formula in the SDK help file.
    Note, the EnableSuppress can be set to True for False, but if there is a formula for dynamic suppression, the True or False value is overwritten.  The results of the formula determine the suppression.
    Is there a way to reference this formula.  I know that I can put on in using the Crystal Report Designer software, I need to modify this formula using VB code and the SDK.

    Hello, Mark;
    If you are using the ReportDocument object you do not have access to the Conditional Suppression formula. You can get around it by using a formula field in the report for the supression and then using the FormulaField code to change it at runtime.
    If you want to change the supression condition directly at runtime you need to use RAS and the ReportClientDocument.
    Elaine

  • How can i read a stored picture in oracle Long Raw datatype? blob or clob?

    How can i read a stored picture in oracle Long Raw datatype? Like a blob or clob?....i am using jdk 1.3
    This is because...i tried to read it like a blob but i obtain a exception...about Type of column no valid......but the column exist....and it contains the long raw datatype of the pictures.....this is my code:
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.InputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.DriverManager;
    import oracle.sql.BLOB;
    import oracle.sql.BLOB.*;
    import oracle.jdbc.driver.*;
    import java.sql.*;
    class rec_ima1
    public static void main(String h[])
    Connection con = null;
    Blob bl;
    final ImageIcon image1;
    JPanel photo;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
    String query = "Select * from pictures where ID = '18840'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    if (!rs.next())
    System.out.println("Empty Result Set");
    bl = rs.getBlob(5);
    if (bl == null) {
    System.out.println("Null Blob");
    return;
    InputStream is = bl.getBinaryStream();
    int imageLength = (int) bl.length();
    System.out.println(imageLength);
    System.out.println(bl.length());
    byte[] imageData = new byte [imageLength];
    is.read(imageData, 0, imageLength);
    image1 = new ImageIcon(imageData);
    photo = new JPanel() {
    public void paint(Graphics g){
    g.setColor(Color.lightGray);
    g.drawImage(image1.getImage(), 0, 0, this);
    } catch (Exception e) {
    e.printStackTrace();
    Now i tried using clob:
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.InputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.DriverManager;
    import oracle.sql.CLOB;
    import oracle.sql.CLOB.*;
    import oracle.jdbc.driver.*;
    import java.sql.CallableStatement;
    class rec_ima4
    public static void main(String h[])
    Connection con = null;
    Clob cl;
    JPanel photo;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
    con.setAutoCommit (false);
    String query = "Select * from pictures where ID = '18840'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    while (rs.next()) {
    oracle.sql.CLOB clob = (CLOB) rs.getObject(5); //line 47
    } catch (Exception e) {
    e.printStackTrace();
    This is the runtime exception:
    java.lang.ClassCastException: [B
    at rec_ima4.main(rec_ima4.java:47)

    Thanks by answering to me......
    Well....i did that....but what is ImageIO?....
    I declared a ImageIcon imageIO, but this give me the following:
    rec_ima3.java:49: cannot resolve symbol
    symbol : class BufferedImage
    location: class rec_ima3
    BufferedImage bi = ImageIO.read(bInput);
    ^
    rec_ima3.java:49: cannot resolve symbol
    symbol : variable ImageIO
    location: class rec_ima3
    BufferedImage bi = ImageIO.read(bInput);
    ^
    What classes i have to import?.....what is ImageIO?
    Thanks

  • How to add a formula column in a report

    Hi
    I have made a report based on a query.
    There are 3 columns in the query and all the 3 are displayed.
    Now I want to add a new column (fomula column) to the report.
    I want to write a query inside the formula column. To execute the query col1, col2 and col3 values are required in the formula column.
    Could you please tell me how to add a formula column in the report and how to pass database column value to inside the formula column
    regards

    Here is how you would create a formula column:
    Open data model of the report.
    Formula column button is on the left side of the tool palette.
    Click on that button.
    Now click in the query group where you want to place the formula column.
    You would see a new field something like CF_1. That is the formula column.
    Double click on the field CF_1. It will open property inspector.
    You would see, Datatype of the formula column is Number. Change this as per your requirement.
    Double click on PL/SQL Formula property. It would open up a editor. Here you can write the code.
    And now to access the data model column here, you can use : and column name. i.e. :col1 or :col2, etc
    And remember you have to return the value back to the formula column. Like this: RETURN(some value).
    You can also take a help from here:
    http://download.oracle.com/docs/html/B13895_01/orbr_howto.htm#sthref1309
    Hope this helps.

  • How can I see the stored files in cache?

    How can I see the stored files in cache? I need them!
    Thanks for helping me.

    The History menu lets you revisit the page where you can drag any page element from it.
    How would you sort through thousands (tens of thousands) of files found in a cache?

  • How to get values/data stored in the database into a list-item.

    how to get values/data stored in the database into a list-item.
    i tried to make a list item without any values assigned to it...but i got the below error.
    FRM-30191: No list items defined for required poplist.
    or
    FRM-32082: Invalid value for given item type.
    List EMPNO
    Item: EMPNO
    Block: EMP
    Form: MODULE5
    FRM-30085: Unable to adjust form for output.
    then according to some docs, i tried the the following for the trigger
    when-new-form-instance
    declare
         rg_name varchar2(40) := 'emp_rec';
         status number;
         groupid recordgroup;
         it_id item;
    begin
         it_id := Find_Item('empno');
         groupid := create_group_from_query(rg_name, 'select empno from emp');
         status := populate_group(groupid);
         populate_list(it_id, groupid);
    end;
    but yet didnt work... :(
    so how the heck do i get values fetched from the database table into the list item?

    for list items you need to values in the record group, one is the shown value and one is the returned value.
    Check out the online help for the populate_list built-in.
    You'll need something like select ename,ename from emp as the record group query.

  • How to interpret statspack report

    Is there any Oracle document describing how to interpret a statspack report ?

    You can take a look at some "real world" examples:
    http://jonathanlewis.wordpress.com/statspack-examples/
    http://oracledoug.com/serendipity/index.php?/archives/1155-A-More-Complex-Statspack-Example-Part-1.html

  • How to get the image stored in archieve link as an attachment in work item.

    Hi All,
    through transaction OAWD we are storing scanned images.
    Once this transaction is executed a workitem appears in the inbox of the initiator with the scanned invoice as attachment.
    When the user executes the work item FV60 screen is displayed where the user enters the data based on the scanned invoice attachment.
    After the user Parks the document the custom workflow triggers and a workitem appears in the inbox of an approver.
    Our requirement is that the scanned image should also appear as the attachment.
    Can you please suggest how to get the image stored in archieve link as an attachment in work item.
    Regards
    Shraddha

    Hi Martin,
    with every parked document a scanned image is linked.
    I need to create a link under objects and attachments in the work item, such that when the user clicks that link the image is displayed.
    At present the following functionality is available.
    The BO used is FIPP
    Objects and attachments:
    parkeddocument:AK0108500001252008.(via FIPP binding with WIOBJECT_ID)
    On clicking the link below objects and attachments: the parked document AK0108500001252008 opens in display mode.
    Now we want to have 2 links:
    parkeddocument:AK0108500001252008.
    image.
    When we click on the link image then the scanned invoice linked to the document should get opened.
    I am able to get the image id of the the image through  SAP_WAPI_GET__OBJECTS,
    export parameter leading_object provides the detail.
    But I am not able to figure out how to use it in my workflow to display it as an attachment.
    Hope this will give a better understanding of my question.
    can you please suggest as to how I should proceed with it.

Maybe you are looking for

  • Creating a folder and adding albums within it

    I'm getting close to throwing my computer. I know this is basic stuff, but I am new to Elements 9... I just returned from the Galapagos and I want to create a file that holds all of my pictures. In that file I want to have folders that correspond wit

  • Syncing ipod from existing Itunes library

    Hi. I need help. My son has an Ipod and has a library of about 200 songs and videos. I just bought my own Ipod - when I opened Itunes and connected my Ipod, it automatically updated all of his songs on to my Ipod. Is there a way to avoid this from ha

  • TS1741 Why won't my phone connect to computer with the cord??

    I have tried to connect my computer to my phone repeatedly but all I'm getting is blank. Anyone have any bright ideas??

  • Default firewall configuration values

    Hi, I've trying to modify my ipfw rules and i got the idea of use a script. After use it i cannot conect to internet and i reverted those new rules but there is one rule that start with my mac and i need to " sufo ipfw flush" to flush it and connect

  • When recording a Mono track

    Hi- I usually record with input Channel 1 (Mono) because I record my guitar w/a regular 1/4" guitar cable feeding it through with a A.R.T. preamp. Now all of a sudden nothing comes through the Channel 1 but now through Channel 2 (Mono). How do I chan