Decode the formula to calculate interactive field

Hello

Need help to decode formula to calculate interactive field.

What is the problem with the formula below?
What I want is...
If the BH field value is 'Y' then get the field value T to another 'OK '.
If the value of the T field does not begin with 'FY11 OR %' then get value in field of another 'OK '.
If the value of field AL ends with "REC" then 'CHECK' otherwise 'OK '.

DECODE (SUBSTR (decode (SUBSTR (decode (BH, 'Y', T, 'OK'), 1, 7), not as 'FY11 OR %', AL, 'OK'),-3), 'REC', 'CHECK', 'OK')

I get the error message: invalid calculation expression. not

Could you please suggest me a correct formula?

FYI, I use Apex 3.0 which does not support the CASE WHEN THEN END.

Thank you
Guy

Hello

It is slow when you use functions like this in query

I don't know how you like it as one more example of

DECODE(DECODE(SUBSTR(T,1,7),'FY11 OU','OK','NOK') || DECODE(BH || SUBSTR(AL,-3),'YREC','OK','NOK'),'NOKOK','OK','CHECK')

And I'm sure it's still slower

Kind regards
Jari

Tags: Database

Similar Questions

  • Formula to calculate interactive report - String field not in position fixed

    Hello

    I use interactive report of the Apex 3.0 as a customer and want to build a formula for the scenario below.

    There is "name of role" as shown below.

    "Role name".
    =================
    FY11 RGBU OvFldMg
    FY11 ChFldIC RPBU Ind Pts
    FY11 All OvFldIC Pts
    FY11 OvFldMg All Pts Ex
    FY11 Rev OUMg All
    FY11 OUSCIC all Rev
    FY11 OUMg Rev/Mrg
    FY11 ChFldMg SysTechApps
    FY11 CpFldIC BI
    FY11 IT all
    FY11 UASRV OUSCMg
    FY11 PrFldMg HlthSc

    I want to create the calculation field' balance sheet the name of role "with the following rule.
    If the role name contains one of the strings, the value 'Role name Check' here is 'OK' else 'CHECK '.

    OV FY11
    PTS
    Rev
    Sys

    The result should be as below.
    "Role name" / "role name check.
    ==============================
    OV FY11 FldMg RGBU / OK
    FY11 ChFldIC RPBU Ind Pts / OK
    OV FY11 FldIC All Pts / OK
    OV FY11 All Pts Ex FldMg / OK
    FY11 All OUMg Rev / OK
    FY11 OUSCIC all Rev / OK
    FY11 OUMg Rev /Mrg / OK
    FY11 ChFldMg Sys TechApps / OK
    FY11 CpFldIC BI / CHECK
    FY11 IT all / CHECK
    FY11 OUSCMg UASRV / CHECK
    FY11 PrFldMg HlthSc / CHECK

    I used a simple formula "DECODE (INSTR (L, 'FY11 Ov', 1, 1), 1, 'OK', 'VIEW')'."
    But this works only if the search string is at the front of the role name.

    Would appreciate your help.

    Thank you
    Guy

    I see guys. Fortunately, there is almost always more than one way to skin a cat!

    It is possible by simply using to DECODE, but you will need to enter in nested DECODE which might be a problem depending on how the string you test against or may need to test against the future.

    If you are simply testing the existence of one of the following strings, how about you do this:

    decode(instr(L, 'FY11 Ov') + instr(L, 'Pts') + instr(L, 'Rev') + instr(L, 'Sys'), 0, 'CHECK', 'OK')
    

    He add the character positions (if found) for each of the channels of test, and if the sum is 0, this means none of the channels found test - if the sum is nothing else, it means that at least one of them has been found. It has the advantage of your being able to add strings in the future while now decent readability.

    Hope this helps,
    John

  • Formula to calculate the SGA for 12 c of OLTP database

    Dear Experts,

    What is the formula to calculate the SGA for an OLTP database application.

    This will surely depends on several variables such as

    (1) the maximum number of connections application would have

    (2) growth of database

    • users connected
    • Server connections
    • total number of connections
    • connection memory
    • OS/application memory

    Thanks John.

    Is below the formula makes no sense?

    Why thank me when you don't know what I said:

    You will not find a formula.

    You formula has nothing to do with the numbers suggested for EBS, which could (only "might") be a reasonable starting point. You have not given any indication of how you arrive at these figures. You just apply that 80% of the RAM formula suggested by Mr. Faruq? If so, you might want to ask him how he justifies the algorithm.

    One point, that you should study management PGA. Your formula assumes that all connected sessions required 30 MB of RAM, all the time. How can you come to this conclusion? On your development system, you can observe how PGA is necessary for the optimal performance of your queries. Then you can ask "how many sessions is actually running a query at the same time?", adds on the non-negotiable PGA by session and calculate the requirement on the PGA TOUR as a result. You should also think about what you call ""memory connection ' and what you call 'PGA Pool'. " These aren't words that I know.

  • How to decode the Last_Date_ field visited in the places.sqlite db?

    I opened the places.sqlite file in Firefox SQLite Manager plug-in. I can see the field of Last_Date_Visited and it's a very large integer. I must be able to decode the date and time out of the field for a matter of human resources. Thank you

    Try to use this time converter.

    http://www.esqsoft.com/javascript_examples/date-to-epoch.htm

    Put this whole in Option 2 and hit so far

  • I have 3 domains. A field is a constant date mm/dd/yy. The second field is a digital number (1-120) and can be changed. The third field calculates two fields 1 and 2 in the summation and shown in mm/dd/yy. How do I calculate that in the script?

    How do I calculate that in the script? I have 3 domains. A field is a constant date mm/dd/yy. The second field is a digital number (1-120) and can be changed. The third field calculates two fields 1 and 2 in the summation and shown in mm/dd/yy.

    You searched for ' add days?

    You must write a custom for this JavaScript calculation because you cannot add a number any date. Also the date strings are not just a number, even if we can convert a given date in a number for that date that represents the time form a date date (Epoch). Witn this value, we can achieve them all kinds of date calculations and collect a little information about the date. JavaScirpt uses midnight on January 1, 1970 UTC for starting point or the date of the time. Its value is zero, and every millisecond increases the value of 1. When a date string is converted to the date object JavaScirpt we have access to many properties of the date and can use several methods to extract information or adjust the date object.

    Field 1 is in the format "Date" with a format of "mm/dd/yy".

    Field 2 is in «Number» format with 0 decimal.

    Zone 3 is in the format 'None '. The custom calculation script applies to the formatting.

    The custom for JavaScript calculation area 3:

    var cField1 = this.getField("Field_1").valueAsString;

    var cField2 = this.getField("Field_2").valueAsString;

    Event.Value = "";

    If (cField1! = "" & cField2!) = "") {}

    Console.println (cField1 + "" + cField2);

    calculate that if we as no null data;

    var cDateFormat = "mm/dd/yy";

    convert start date date object.

    Kai var = util.scand (cDateFormat, cField1);

    get the date of the month;

    David var = oDate.getDate ();

    Add field 2 number of days;

    David = Number (nDate) + Number (cField2);

    of being updated for the new date.

    oDate.setDate (nDate);

    Set the field to update formatting;

    Event.Value = util.printd (cDateFormat, letter);

    } / / end of data not null;

  • Change the font in the interactive fields in Adobe Acrobat

    I've set up a form in InDesign CC, with interactive fields. I exported and opened in Adobe Acrobat and it works very well. The only problem is I want to change the font in the fields of interactive text to Arial rather than Times New Roman. How can I do this?

    Go to tools - form prepare and then select the fields, right-click on one of them and select Properties. You will be able to set the font of the text on the appearance tab.

  • Buttons to lock the other interactive fields after a click. Known issue?

    Hi, I'm new to editing pdf forms and made my own experiences here and found this problem.

    It started after 10 or if the actions buttons with the mouse, some even with simple javascript added to it.

    After clicking on a button (not with action "hide a field" tied to it), all interactive fields (even the same buttons) throughout the document becomes impossible to edit (no matter if they are in number, text, radio, other buttons, list boxes...) when you click, the arrow hits flashes very briefly, followed by the de-selection of the box. The same 'lock' does NOT occur when you click on the other form of boxes such as checkboxes (more than 20) or radio (the file has 3 sets of those) or the one of / increment of keys other fields with javascript.

    The only way around it I found was to close and reopen (player) or (editor), switch between edition/visualization tools.

    While the editor, it's a minor annoyance for users of forms complete thanks to a reader, it's pretty horrible. Really, I would like to know if there is a way to avoid this.

    Is this a known issue? Anyone have a solution or an idea which continues? Impossible to find anything like that around the navigation there must be something about my edit...

    Thank you!

    EDIT: Specifically, I reduced to buttons that have the action to hide. (And it's quite a decent feature for what I am building here, so different solutions than "don't have not the buttons are hidden when the click on" would be much appreciated.)

    Hi, thanks. After trying many things, I found a work around that, this time, is quite good.

    Well actually, it's the same thing as establishing a mouse "hide", but a different code path.

    I have set up an action, mouse, executes Javascript:

    var l = this.getField ("buttonX");

    w.Display = display.hidden;

    He made all his other click on operations, and the code js it hides. And the other fields are to be filled / clickable.

    On the error itself, perhaps something with versions... I noticed using different readers/editors, everyone behaved differently...
    But it's done, if someone comes to this impasse, try this, worked for me (God bless js)

  • HELP - lost the button "calculate" in the "text field properties"! I try to summarize the total for separate text fields in a summary box.

    Help, please!  I try to summarize the total for separate text fields in a summary box, but have lost the tab 'calculate' in the 'text field properties area.  Any help would be greatly appreciated!

    When in forms editing mode (Tools > prepare form), select: more > return to the Acrobat form

    In the future, check the box 'this document requires signatures' when you choose at the beginning: Tools > form prepare

    unless you plan to use the form with eSign Document Adobe cloud service.

  • Report EN: How to remove #ERROR appearing in the formula fields?

    Hi gurus,

    Is there a way to remove #ERROR appearing in the formula fields. I tried a updated conditional formatting if condition saying: If the value of the cell is equal to #ERROR, replace it with "-" but it doesn't seem to work. Is there no alternative workaround for it?

    Thanks in advance for the help.

    for the grid, there are options to replace the #missing, something else and #error woth all you want.

  • Error: 1200416 formula to [staff] runtime error (line 0): impossible to assign [DOUBLE] objects of different length in the exercise of calcing the dimension to calculate the formula of Member

    Receive the below error message:

    Error: 1200416 formula for [AccountMemberName] (line 0) runtime error: could not assign [DOUBLE] objects of different length

    I added the following member formula to a dense account member name. {end: I created an account called S_BegBalance to contain the data for numbers codes.} For example, if S_BegBalance = 1, effective must be 1 for the whole year (January-December). If the balance S_Beg = 2, staff: Feb-district of Columbia, for S_BegBalance = 3, effective is Mar - Dec.

    Effective is a member (dense) S_BegBalance shop is also a dense Member store.

    [Please indicate why There getting worse this error? Can I take care of this with calc script only?]

    Aggregate and script to calc Calc the Member of the calc formula is:

    Fix ("FYxx", "script", "version")

    Fix (@LEVMBRS(Product,0), @LEVMBRS(Entities,0), @LEVMBRS(Region,0), @LEVMBRS(position,0))
    @DESCENDANTS ("AccountParentMember");
    ENDFIX

    DIM(Entities,Region,Position) CALC;

    ENDFIX

    Formula Member

    IF (@ISMBR ("Budget") AND @ISMBR ("1st Pass - Budget"))
    IF (@ISMBR ("FY14") AND ("S_BegBalance" == 1))
    @IDESC ("YearTotal") = "Downsizing" == 1;

    END IF

    IF (@ISMBR ("Budget") AND @ISMBR ("1st Pass - Budget"))
    IF (@ISMBR ("FY14") AND ("S_BegBalance" == 2))
    "Feb" = "Downsizing" == 1;
    'Mar' = 'Downsizing' == 1;
    @IDESC ("Q2") = "Downsizing" == 1;
    @IDESC ("Q3") = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    END IF

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 3))
    'Mar' = 'Downsizing' == 1;
    @IDESC ("Q2") = "Downsizing" == 1;
    @IDESC ("Q3") = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 4))
    @IDESC ("Q2") = "Downsizing" == 1;
    @IDESC ("Q3") = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 5))
    'May' = 'Membership' == 1;
    "Jun" = "Downsizing" == 1;
    @IDESC ("Q3") = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 6))
    "Jun" = "Downsizing" == 1;
    @IDESC ("Q3") = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 7))
    @IDESC ("Q3") = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 8))
    "Aug" = "Downsizing" == 1;
    "Sep" = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 9))
    "Sep" = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 10))
    @IDESC ("Q4") = "Downsizing" == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 11))
    "Nov" = "Downsizing" == 1;
    'Dec' = 'Membership' == 1;

    ELSEIF (@ISMBR ("FY14") AND ("S_BegBalance" == 12))
    'Dec' = 'Membership' == 1;

    ENDIF

    I edited the formula to find out where is the error?

    IF (@ISMBR ("Budget") AND ("S_BegBalance" == 1) AND @ISMBR ("1st Pass - Budget") AND @ISMBR ("FY14"))
    @IDESC ("YearTotal") = "Downsizing" == 1;

    ENDIF

    IF (@ISMBR ("Budget") AND ("S_BegBalance" == 2) AND @ISMBR ("1st Pass - Budget") AND @ISMBR ("FY14"))
    @IDESC ("Q2") = "Downsizing" == 1;
    @IDESC ("Q3") = "Downsizing" == 1;
    @IDESC ("Q4") = "Downsizing" == 1;
    "Feb" = "Downsizing" == 1;
    'Mar' = 'Downsizing' == 1;

    ENDIF

    7e3ca589-4260-401d-ba03-77f60bdde99e wrote:

    I added the following member formula to a dense account member name. {end: I created an account called S_BegBalance to contain the data for numbers codes.} For example, if S_BegBalance = 1, effective must be 1 for the whole year (January-December). If the balance S_Beg = 2, staff: Feb-district of Columbia, for S_BegBalance = 3, effective is Mar - Dec.

    Effective is a member (dense) S_BegBalance shop is also a dense Member store.

    Assuming you enter value to BegBalance during Sun, we can write something like this:

    FIX (& VarYear, & VarScenario, & VarVersion)

    Fix (@LEVMBRS(Product,0), @LEVMBRS(Entities,0), @LEVMBRS(Region,0), @LEVMBRS(position,0))

    FIX(JAN:DEC)

    "Workforce".

    (

    IF ("BegBalance"-> "S_BegBalance" == 1))
    1;

    ENDIF

    )

    ENDFIX

    FIX(FEB:DEC)

    "Workforce".

    (

    IF ('BegBalance'-> 'S_BegBalance' == 2))
    1;

    ENDIF

    )

    ENDFIX

    FIX(MAR:DEC)

    "Workforce".

    (

    IF ('BegBalance'-> 'S_BegBalance' == 3))
    1;

    ENDIF

    )

    ENDFIX

    ENDFIX

    ENDFIX

    There may be many other ways of writing this is an optimized way!

  • Formula of FormCalc to make the difference between two time fields if they are populated - help please


    Hello

    I have a laptop (TotalTime1) which refers to two other cells in the updated hour-shaped (Start1 and 1 to finish).

    The formula below is intended to make the difference between the time of departure and of arrival if they are populated.

    I had to work unconditionally HasValue, but the formula was calculated when there is no value in the Start1 and Finish1 (due to the time format).

    This is the code I have, it is said that there is an error of almost the last line; I'm sorry if I'm posting this in the wrong way, I haven't posted on this forum before but this is:

    If (HasValue (Finish1) and HasValue (Start1)) then if (Time2Num (Start1.formattedValue, "HH: mm") < Time2Num (Finish1.formattedValue, "Hh: mm")) then Abs (Time2Num (Start1.formattedValue, "HH: mm")-Time2Num (Finish1.formattedValue, "HH: mm")) / (60 * 60 * 1000) another 24 - ABS (Time2Num (Finish1.formattedValue, "HH: mm")-Time2Num (Start1.formattedValue, "HH: mm")) / (60 * 60 * 1000) endif

    Any help would be appreciated.

    Cordially Fetachini

    you need an another endif at the end (you have nested statement and only 1 endif)

  • Need help with the FORMULA by the numbers

    I need a table to calculate my order of shirt by color and size. What I am doing wrong?   Thank you

    If by "score" you mean County, you could do something like this:

    The formula in B2, filled and right at the bottom, is:

    = COUNTIFS(Table 1::$B,$A2,Table 1::$E,B$1)

    COUNTIF is built using a series of pairs of the condition column.

    And if you mean by 'score', for example, the amounts in the column amount instead of the counts, he could do something like this:

    = SUMIFS(Table 1::$G,Table 1::$B,$A2,Table 1::$E,B$1)

    Make sure that your table with the data from the source (in my example, table 1) is a separate table is not part of a larger table (as your screenshot seems to suggest).

    SG

  • How to use the formula to give strength to nic as 3mg for vials of 10ml times 10 and 30 ml times 10 as the sum if formula

    I would like to find the formula to get amount in ml for a specific flavor and strength, above is a screenshot of what I have, I want to find the total ML anyway.

    something like SUMIF.  Force 18, A2, Bottlesize * quanitty, but if I do that it returns an incorrect amount. so as the size of bottle of 18mg, A2, works on the total of the size of the bottle, but I want to calculate the size strength then bottle by quanitty so I should be able to have 10ml and 30ml and quantitys different for some force so I should finish with total quantiy off varied packaging

    18mg, A2, 10 x 10 ml

    18mg, A2, 30 ml x 5

    18mg, A2, 120 ml x 2

    so they should add up to 490 no 160

    If I understand your question, you can do something like this:

    = SUMPRODUCT (C, D)

    SG

  • calculation using the formula node needs two clicks

    Hello

    I want to use this piece of code for a larger program. My goal is to take 10 values and calculate two values using a formula. I used the formula node as the calculation functions digital ordinary would be too heavy. If I click on save, it saves two values to a file.

    The problem that I am facing is that when I start the program, it works very well for the first time. The second time however, if I change the values, and then click on save, it still displays the previous values, or some altered values. I have to click on save twice to get the correct values. I don't understand the reason why this happens. Can anyone help?

    File attachment: Capture screen and VI.

    P.S. If the solution can help with the problem, I'm ready to change any part, but please, not irrelevant to suggestions on how to * improve my code *, because I've worked hard to make it work with another major project.

    I don't completely understand the description of your problem.  But I see two problems.

    1. the "Save" button actually belongs to the event that handles the record button.  And the case of the event should really be Jean-Claude Value Change of mouse down?

    2. your STOP at the bad mechanical action.  Since it happened so this just released, it is only true while you're pressing it.  It stops the upper loop, but can't stop low loop because your loop will also be waiting to save button to press.  Stop will always be false because you cannot press two buttons at the same time.

    Try to make your action to stop button to be changed when released.  You must return the button to false programmatically born of two loops.  In fact, it would be better to have a case of events for the stop button to stop the lower loop.

    I don't understand what you're trying to do in the upper loop.  You read a file as soon as possible, and it seems to be the same file that you create in the lower loop.  Why?

  • Decode the smileys in ActiveRichTexhField

    How to decode the smiley on ActiveRichTextField?

    On the API, it says:

    getText

    Retrieves the string of text in this field.

    If smilies exist in this area, this method first "decodes" and then returns the result.

    is there a function which can be override to decode the smiley? because I have ActiveRichTextField with the emoticons (Smileys) on it and when im copying the smilies I want back the smileys/emoticons code to the Clipboard.

    I found the solution in replacement of the selectionCopy and selectionCut and to treat the captured object

Maybe you are looking for