Query on calculated field where deletes conditions of the clause

Hi gurus,

Under a new requirement, we have created a new field calculated in Contact before JC, which removes the condition from which to extract the clause and made full table.

Requirement:

We have a field in the user interface, that has data like "J1234" or "K44335". Customer won't see the first character of the alphabet of these data.

Solution, we have developed:

(1) create a new calculated field 'ABC person UId Calc' as follows.

Name: ABC person UId Calc
Calculated: true
Computed value: right ([nobody UId], Len([Person UId]) - 1).

(2) exposed this field in the user interface.

Question:

When the user queries in the applet for this field, the generated SQL code has no condition in a Where Clause to the query on PERSON_UID.

SQL has earlier been something like...

(T25. EMP_FLG = 'N') AND (T25. PERSON_UID LIKE: 3)

But after you make this change, the current SQL is trimmed of the just

(T25. EMP_FLG = 'N')

This means that this isn't question with PERSON_UID, resulting in an impact huge performance.

If someone could suggest on this issue, to the difficulty.

Concerning

Oh sorry, I guess I missed something.

I guess the simplest solution is to store the values of redundantly (A, B the value of the value and the value of A + B) and stop using a calculated field.

You could script something in the PreQuery event, but I think it's an ugly hack.

Tags: Oracle

Similar Questions

  • calculation fields do not work on the web

    I created a pdf to a word doc form.  I tested it and all fields of computing work very well, but then I'm going to post on our Web site and all calculation fields do not work.  The formatting in the field appears as well, which means that when I created the form to fill out that I made the fields of theses to represent a monetary unit (e.g. $5.00) and when I post on the web it appears simply as a number (5) and nothing in this column adds up.

    Any suggestions?

    No, you can't get them to work on any browser. Chrome has the most support for PDF and JavaScript forms, but it is not as comprehensive as Acrobat/Reader. Consider educate users to directly open the form in Adobe Reader.

  • Calculation field does not submit to the login page

    Hello
    I am Vaibhav Sonawane I put the point of application on submit the calculation on page 101 of connection. When I have connection point of time first then application not defined after disconnection and connection new application point is defined. Please help me why is this happening

    Use a calculation of demand and condition so that it runs only once. For example, using a PL/SQL Expression =>: APPLICATION_ITEM IS NOT NULL

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • script for reading calculated field changes color according to requirement

    I need help to create a script that would do a single reading calculated field to change color if a condition is met.  If the script placed in the calculated event?

    The fields are:

    CourseNum (automatic sum calculates 11 different numeric fields)

    A1p (digital calculated read only field)

    AP (digital calculated field read-only)

    HIGHA (the sum of the A1P and AP) - this is also a calculated read-only field

    Therefore the condition:

    If CourseNum > 20 and HIGHA > = 50%

    then change the background color of the yellow HIGHA

    otherwise, it should be white

    This is your statement. The "or" is the last used operation. So, you're saying, ' if the year 4 and (B1P + BP) > ".45" OR so (B1P + BP)<".30" and="" coursenum="">= "20", then change the background.»

    Try:

    If (form1. #subform [0]...) YearLevel == 4 & ((B1P+BP) > ".45" or (B1P + BP)<".30") &="" coursenum="">= '20')

  • I cannot select the names of the fields calculated field options. When I try to use the simplified field Notation: change, there is no "OK" button after typing my calculation. Why I don't see these features. I have Adobe Acrobat XI - v11.0.13

    I have Acrobat XI and I'm not able to create calculated fields. When I use the value matches the section, then click on choose to select the fields, it does not select unique fields. I can click Select all or deselect all the... but that's all. So I tried using the simplified field notation and click on modify... the Java script box opens. I can type the script... but there is no options down to say OK or cancel. I don't see any of these options. Why I use this feature?

    Kimberly

    To select a single item from list click on it and then press the SPACEBAR.

    The other question is very strange... Try to run a repair installation.

    On 27 October 2015 14:06, "kimberlyf63795453" [email protected]>

  • Need of a calculated field in my model

    Hello

    is it possible to have a calculated field in my model. The valid calculated field when I create an INTERNATIONAL organisation is based on the comic book which has the calculated field.

    My point is:

    -Need a field to calculate the average of days between two dates (like the start and end dates) to different folders.


    What is the best way to do it? a calculated field? Thank you.


    Kind regards

    Hello

    You push the calc up to your IO, or do it in the model. There is a blog on Calc data here:

    http://blogs.Oracle.com/XmlPublisher/2008/09/date_functions.html - Intro
    http://blogs.Oracle.com/XmlPublisher/2009/09/groovy_date_functions.html - date-specific diffs

    Tim

  • Can I create a PDF form with a field for adding/editing of the Photos?

    Does anyone have a solution to the following problem?

    I would like to be able to a form usable by others in the Office to fill out a particular inventory and model number.  (Fields, easy)

    Then have a field where they can replace the PICTURE of the item designated by the model number and inventory.

    Is this possible with Acrobat professional? Can the document can be saved as, or exported from there somehow?

    I know it's easy to do in Word probabably, but a photo can be changed on a PDF file and saved in the form?

    Thanks for any help or suggestion!

    DaddyOfZed

    It will make it possible for them to choose a new picture. You want never pull you the picture of the shape to use elsewhere?

    In order to implement in Acrobat, you can create a button to display the image, other than 'Label only' value its page layout and add JavaScript code next to the action of the mouse upward:

    Prompt the user to select an image

    event.target.buttonImportIcon ();

    For PC users, Acrobat Standard is sufficient for this.

  • Compare the text of the combobox as a condition in the calculation of the field another.

    I'm doing a condition, if one of the 15 comboboxes has a certain value of selected text list, then a button is displayed.

    I tried to follow this example, which I found here on another question:

    var t = document.getElementById ("fTerminalType");

    selectedText var = t.options [t.selectedIndex] .text;

    the part of my code that uses it is:

    for (i = 1; i < 16; i ++) {}

    var t = this.getField ("ComboBox" + i);

    var s = t.options [t.selectedIndex] .text;

    If (s == 'Specific text') {}

    k.Display = display.visible;

    }

    }

    "Combobox1" so has "A specific text" selected, but the "k" key does not appear visible, and the rest of the code (a calculation) returns empty.

    If I delete the internal code of "for () {}", the rest of the calculation works, if the syntax error is specific to the part of text comparison.

    I tried 'value', ".innerHTML", ". export.value", '.change' and '.changeEx' instead of '.text', nothing has worked.

    I don't know if pdf forms have jQuery, I could try it but that he would need assistance with the code so be it.

    Thank you.

    The value property returns the value of export of the selected item if it has one, otherwise it returns what appears, which is what you call text. SO if someone type something, you can retrieve it with the value property, even though you really better to use valueAsString. Check the console JavaScript (Ctrl + J) to see if errors are reported.

    If you need to get the value of the export value display, you can use the field currentValueIndices property to get the index of the selected item and use it with the field getItemAt method to get the display value. A code example is the Acrobat JavaScript reference.

    I don't notice anything wrong with your script updated, if you add a break after the k.display statement statement, since you do not need to keep a loop once it is set. Unclear if it is initialized to display.hidden somehow, what would make sense.

  • Calculation No. Longer Works if a value in a field is deleted

    I have a question where a FormCalc calculation stops working if I delete a value in a field that is part of the formula.

    Here is a link to the test form: https://www.dropbox.com/s/3w6weyd3bp5dfss/Test_Totals.pdf?dl=0

    When I enter values in the table below, the calculation in the field of the CASH DUE EMPLOYEE works very well.

    Total_B.jpg

    If I delete the value in the field of the ADVANCE of FUNDS, the calculation in the field of the CASH DUE EMPLOYEE is not recalculated.  In the example below, I've removed the cash advance, so the EMPLOYEE DUE CASH should be $ 100, but yet the field is empty.

    Total_A.jpg

    This is the FormCalc script in the field of the CASH DUE EMPLOYEE:

    If (Table1.Row1.Total_E_Exp.rawValue > Table1.Row2.Cash_Adv.rawValue) then

    Cash_Due_Employee.RawValue = Table1.Row1.Total_E_Exp.rawValue - Table1.Row2.Cash_Adv.rawValue

    on the other

    Cash_Due_Employee.RawValue = 0

    endif

    I just can't understand why the field isn't recalculate after that I deleted the value in the field of the CASH ADVANCE.

    Any help would be appreciated.

    Thank you

    Not sure why FornCalc does not work, but the same logic works fine JavaScript.

    Check the form at the following link:

    Dropbox - Test_Totals2.pdf

  • How to filter records in a main query of RDF based on the values of the calculated fields

    Hello

    I'm working on a report of RDF, where I have my main request which has four fields.

    (1) the unique id for the field

    (2) numerical value 1

    (3) numeric value 2

    (4) numeric value 3

    I added a CF_Total of calculated field.

    The main query returns all the records, but I want to only show that these fields for which the CF_Total has a particular value.

    Can anyone help me about how to proceed.

    Concerning

    Hawker

    Hello Hawker,

    This is an example, how you can filter based on the formula column. I don't know exactly where you would use. And other related issues.

    Give the idea and example how you can start.

    Thank you

    Hamid

  • Delete zero balances in calculated fields and zero decimal points

    Hello

    I found the right java script to remove the balances of zero in calculated fields, but also, so I have to remove the two decimal points.  Can I work on what I need to add and where in java script so that it works?

    Thank you

    Nicole

    If you don't want to show any decimal places, this means generally that you want to round down to an integer. To round to the nearest integer, you could modify a single line of script in the Format:

    AFNumber_Format (0, 0, 0, 0, "$", true);

    and the same for the script of the hit. Note that this does not change the actual value of the field, it doesn't change what is displayed in the field. This is important if the value of the field is used in a calculation or exported, since it won't be the same as what is displayed. To change the value of actual field to round to an integer, it is usually best to use a custom validation script.

  • Calculation value that is used in the Condition of year-round

    I found that if I have a text field element in a region and I put its value in a calculation (after the region) that this element will not work in a "condition to evaluate.

    Text field element is FirstName. No set of default values and "always replace...". "
    Calculation (after the regions), the value as a static assignment to JOHN.

    There is a second computation (after Regions) for another article with a condition. The condition is "the point value to expressin 1 = value of element in the expression 2".
    First name in JOHN and expression1 in expression2.

    When I look at the debugging session FirstName prepares to JOHN, but the second calculation does not run.

    Now if I give FirstName, a default value of JOHN where the element is defined, then the second calculation runs.
    It appears to me that something different is happening with a calculated value that does not allow to use in a condition. Can anyone help.
    Thank you very much.

    Hello

    I tried to reproduce your case:

    I have a region containing two elements P6_X1 and P6_X2 (no default value and always...):
    For P6_X1, I created the static calculation (after region, sequence 1)
    For P6_X2, I created the math static (after region, order of the sequences 10) with the conditon (value of the element / column is 1 Expression = Expression 2), where Expression1 = P6_X1 and Expression2 = JOHN

    And in my case it works:

    You can see what is happening in my debug

    0.09112     0.00030     Computation point: After Box Body
    0.09142     0.00031     ...Perform computation of item: P6_X1, type=STATIC_ASSIGNMENT
    0.09173     0.00046     ...Performing static computation
    0.09219     0.00093     ...Session State: Save "P6_X1" - saving same value: "JOHN"
    0.09312     0.00031     ...Perform computation of item: P6_X2, type=STATIC_ASSIGNMENT
    0.09342     0.00039     ...Performing static computation
    0.09381     0.00038     ...Session State: Save "P6_X2" - saving same value: "LITTLE"          
    

    Have you checked the sequence of your calculation?
    What is your exact condition for the calculation? For expression2 don't you user JOHN or "JOHN"?

    Kind regards
    Aljaz

  • Duplication of a query on multiple fields

    Hello

    We have a form for more information of the person to research-toward the top. It consists of a block of record single (PERSON) with fields as a PERSON. PERSON_SURNAME per PERSON. PERSON_FORENAME. The user uses the built in buttons query enter and execute the query to find records. However, there are also areas such as the PREVIOUS_SURNAME that users often not worth the question which results in the creation of duplicates when they do not find the record they seek.

    I was wondering if there is a way to capture the query the user entered and extend it to other areas? For example, if they entered "SMITH %" in the PERSON_SURNAME area, instead of the form creating the query:
    «Select * from person where PERSON_SURNAME like «% SMITH»»

    He would go:
    «Select * from person where PERSON_SURNAME like '% SMITH' or PREVIOUS_SURNAME like «% SMITH»»

    Also, some users forget to include a % in their query, so I was hoping there was a way to efficiently add to each request automatically.

    It would be quite simple if we were using a custom query button but is it possible to do everything using the integrated toolbar buttons?

    Thank you

    forms will treat this as and, AND query and I need to be a RC.

    You are right, for got to this topic.
    It actually is the same reason why you should not do:

    :PUPIL_SURNAME := :PUPIL_SURNAME||'%';
    etc. with the other fields.
    

    You give value fields, essentially the same as what I suggested in the PRE_QUERY. Then, you make one AND where clause again. This is the functionality of the default value when:
    "These clauses are automatically * added * to the SELECT statement that built the Form Builder.
    Try this:

    :PUPIL_SURNAME := :PUPIL_SURNAME||'%';
    xwhere := '(pupil_surname like '''||:PUPIL_SURNAME||''' or prevname like '''||:PUPIL_SURNAME||''')';
    :PUPIL_SURNAME := null;
    ... and the rest too...
    
  • expdp + query option to export from several tables with the same condition

    Hello

    We want to export a subset of data only from databases to another. Both on AIX.

    Source/testdatabase 11.2.0.3 (non partitioned tables)
    Target productiion 11.2.0.3 database (separate tables)

    Tables of same names of columns but diffrenet structures a partitioning index and traget so only want to import content

    Each source datbaase hascolumn seq number table and want only to extract the last months of data.


    TABLES:table1,table2...
    DUMPFILE=dump_dir
    CONTENT=data_only
    QUERY= table1:"WHERE seq_num >100 "
    want to use expdp but not sure how to make sure that all tables have the seq_num WHERE > 100 condition, if let table1: go out and have just
    QUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."


    I'm assuming that can also use impdp CONTENT = data_only?

    Any ideas/thoughts?

    Thank you

    QUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."

    Yes, it will work for all tables, but ensure that all exported table must include this column.

    QUERY
    Default: no
    Goal
    Allows you to filter the data that is exported by specifying a clause of a SQL SELECT statement, which is applied to all tables in the work of export or a specific table.

    The query_clause is usually a WHERE clause for the selection of refined lines, but could be any SQL clause. For example, an ORDER BY clause can be used to accelerate a migration from a table in a heap in a table held in index. * If a [schema]. table_name is not provided, the query is applied to (and must be valid for) all tables in the export job.*

    http://docs.Oracle.com/CD/B19306_01/server.102/b14215/dp_export.htm

  • SQL only: WHERE Condition pulled the correct runtime of the Central "SQL" tab

    I have a requirement that seems like it should be easy to solve in SQL, but me seems to be stuck with blinders and can't see the solution.

    The 'problem' that I'm trying to solve is to get several reporting units to any use of the SQL even in their where clause for certain types of metrics reports. So this is the solution I am proposing that we store the sql in a central table, which, in a simplified form, would have two columns as:

    GroupName Varchar2 (2000)
    SQL_Filter Varchar2 (5000)


    What I want to do conceptual, it's allow the user (even if they're using MS - SQL) to


    WHERE FunctionName (GetSQL_ForGroupName)

    But first of all, I would tell them that this can be done in Oracle sql. However, I can't understand how to achieve this end. From what I've read so far that oracle will not do:

    WHERE (subquery that returns SQL)

    or (in SQL)

    WHERE VariableSubstition

    or

    WHERE FunctionName (GetSQL_ForGroupName)

    It seems that these things in the WHERE clause allows Oracle after only

    FieldName [operator]

    as in

    WHERE price > (subquery)

    or

    WHERE ID IN (Value) Function

    Is it possible to do a subquery (or anything else) that allows me to draw the where clause running SQL - using only SQL? I can do this with a stored procedure, but it is to say it seems to me I had start coding select specific instructions for them or code so that they could enter select statements (or joins etc.). I don't want to write a complete dynamic reporting engine. I want to do is be able to pull the sql running. This ensures that everyone is 1) with the good sql for metrics 2) by using the same sql and 3) the core sql parameters can be stored in one place instead of 3000 definitions of the various reports.

    I must be looking at this the wrong way, I think. The solution does NOT seem to do WHERE (pull in the SQL running)... but I was not able to find a different way of thinking. For example, WITH does not resolve as you immediately the requirement WHERE fieldname [operator] [subquery | function]. I was browsing the internet and looking through all the books SQL on Safari of O'reilly but I have not met a solution. However, I think, this issue of 'centralization of base SQL' must have been resolved several, several times previously. Why can't I find anything on it then?

    Brad

    You might use a pipeline function to return a TABLE object. This function accepts a parameter that contains the name of the Group (although "GetSQL_ForGroupName" is supposed to represent). The query that they deliver will then look something like this:

    SELECT column_list
    FROM   TABLE(table_function('GroupName'))
    WHERE  additional_conditions
    

    In the function, you can create the SELECT statement that channels the rows in the table with WHERE conditions pulled a table for the provided group name.

Maybe you are looking for