Display values based on the flag

Oracle 10g version

Hi I have a model in a variable and I need display or hide some lables based on certain values.
I have an example below .copying the output from the example below.
I love lables I need to show or hide based on the values of the label. Please let me know the solution...
/* Formatted on 2010/07/08 20:50 (Formatter Plus v4.8.8) */
set serveroutput on;
DECLARE
   v_content   VARCHAR2 (4000);
   v_mflag      VARCHAR2 (1)    := 'N';
   v_cflag      VARCHAR2 (1)    := 'Y';
   v_template   varchar2(4000)   := 
                                       'Date            :mail_dt
                                        Dear            :cust_name
                                        Request Number  :vzb_track_no
                                        Order Number    :ord_no
                                        Order Activity  :ord_activity
                                        Product         :prduct
                                        Managed         :managed
                                        Cpe             :cpe_ord';
BEGIN
   v_content := replace(replace(replace(replace(replace(replace(replace(replace(v_template,
            ':mail_dt',sysdate),
            ':cust_name','Steven'),
            ':vzb_track_no','ABC123'),
            ':ord_no','XYZLKJHGVC'),
            ':ord_activity','Assigned'),
            ':prduct','Phone'),
            ':managed',v_mflag),
            ':cpe_ord',v_cflag);
            dbms_output.put_line(substr(v_content,1,254));
            dbms_output.put_line(substr(v_content,255,499));
END;
Out put
Date                    08-JUL-10
Dear                    Steven
Request Number   ABC123
Order Number      XYZLKJHGVC
Order Activity      Assigned
Product              Phone
Managed            N    -- i dont need this row
Cpe                   Y         

new learner wrote:
Out put

Date                    08-JUL-10
Dear                    Steven
Request Number   ABC123
Order Number      XYZLKJHGVC
Order Activity      Assigned
Product              Phone
Managed            N    -- i dont need this row
Cpe                   Y         

You can strip the line before the declarations to REPLACE;

DECLARE
   v_content   VARCHAR2 (4000);
   v_mflag      VARCHAR2 (1)    := 'N';
   v_cflag      VARCHAR2 (1)    := 'Y';
   v_template   varchar2(4000)   :=
'Date            :mail_dt
Dear            :cust_name
Request Number  :vzb_track_no
Order Number    :ord_no
Order Activity  :ord_activity
Product         :prduct
Managed         :managed
Cpe             :cpe_ord';
BEGIN
   if v_mflag = 'N' then
     v_template := regexp_replace(v_template,chr(10)||'.*:managed');
   end if;
   v_content := replace(replace(replace(replace(replace(replace(replace(replace(v_template,
            ':mail_dt',sysdate),
            ':cust_name','Steven'),
            ':vzb_track_no','ABC123'),
            ':ord_no','XYZLKJHGVC'),
            ':ord_activity','Assigned'),
            ':prduct','Phone'),
            ':managed',v_mflag),
            ':cpe_ord',v_cflag);
   dbms_output.put_line(v_content);
END;
/

Date            10-07-08
Dear            Steven
Request Number  ABC123
Order Number    XYZLKJHGVC
Order Activity  Assigned
Product         Phone
Cpe             Y

Tags: Database

Similar Questions

  • LOV display value based on the locale change

    Hi all
    I have this problem:
    my application is supposed to support two languages, English and another language.
    the user can change the regional settings by pressing a command link in their browser and switch between these two regions.
    all messages and labels are converted correctly.

    but in my case I use several objects in display list of choice as a data source for my LOV.
    for example, the views contain three columns:
    1 - id: which is the return value
    2 - English_meaning: description in English
    3 - Another_language_meaning: description in another language.

    is it possible to change the value displayed in LOV based on locale
    (i.e. If the user choose English locale English_meaning column will appear on LOV and when it goes to non_English_locale, the Another_language_meaning column is displayed)

    any help please.

    Maybe you find this post useful
    http://adfpractice-Fedor.blogspot.com/2011/02/ADF-BC-multiple-lovs-for-Vos-attribute.html

  • Fill a field value based on the value of another field

    Hello
    Could someone tell me what is the problem with the following select statement. For a group of records, trying to fill a field with a value based on the value in another field (problem of status), but the Group of records appears empty just when I put this code in the field.
    Any help would be appreciated
    Thank you


    <? choose:? >
    <? When: IssueStatus = "Open"? >
    <? 1? >
    <? end when? >
    <? otherwise:? >
    <? When: IssueStatus = "closed"? >
    <? 2? >
    <? end when? >
    <? otherwise:? >
    <? When: IssueStatus = "Unresolveable? >
    <? 3? >
    <? end when? >
    <? end otherwise? >
    <? end to choose? >

    Use the following syntax.

    
    
    Display 1
    
    
    Display 2
    
    
    Display 3
    
    
    
  • VI to convert input signals NI 9402 in a RPM value, based on the frequency of the pulses

    Hello

    I'm looking for a VI convert an input signal NI 9402 in a RPM value, based on the frequency of the pulses. Is there such a thing that exists in the library of national instruments?

    I run LAbview 2014 integrated control and monitoring on on a cRIO 9802 high performance integrated system with NEITHER 9402, 4 channels, 50 LV, LV TTL Module input/output digital, ultra high speed digital i/o for the cRIO module.

    Any help would be greatly appreciated.

    The easiest way is to use the FPGA to get the time between the edges of your pulse increase (shift registers to maintain the current situation and the time will be necessary).  This will give you the period.  If it's a single pulse per turn, then the number of laps is just 60/T, where T is the time in seconds.

  • values based on the following logic 'values after the first values of two '_' and before last '_' values '.

    Hi all

    I need the values according to below 2logics in a single select query using instring and substring

    1 values based on the following logic 'values after the first values of two '_' and before last '_' values '.

    2 values based on the following logic 'values after the first values of two '_' and before last'-'values '.

    EXM:

    Entry: ABCD_EFGH_IJKLM - NOPQ_XYZ output: IJKLM - NOPQ

    Entry:. ABCD_EFGH_IJKLM - NOPQ output:IJKLM

    Thank you.

    Check the following

    WITH DATA1 AS

    (SELECT "ABCD_EFGH_IJKLM - NOPQ_XYZ" double val)

    UNION ALL

    SELECT 'ABCD_EFGH_IJKLM - NOPQ' double val

    )

    SELECT SUBSTR (VAL, INSTR(VAL,'_',1,2) + 1, DECODE (BIGGER (INSTR (VAL, '_',-1, 1), INSTR(VAL,'-',-1,1)), INSTR (VAL,'-', - 1, 1), LENGTH (VAL) + 1, INSTR (VAL, '_',-1, 1))-(INSTR (VAL, '_', 1, 2) + 1))

    OF DATA1;

    Concerning

    Salim

  • Calculate values based on the boxes are checked - for Dummies...

    Hello and thank you all in advance for your help. I'm trying to calculate a value based on the boxes checked. Specifically, I would like to add a particular value $$ each CheckBox and if this box is checked, I want to add to the total rental value (see screenshot below):

    Screenshot (1).png

    As you can see in the screenshot that I have different areas that can be selected (first floor, court before, etc.), I want to assign a value to the checkbox of each region (and added value for others) and calculate a total in the "Balance of rental fees" less the deposit. I'm new with java and scripts but not know how to do it in an excel formula. I guess it's very different from what little I know of Java. Any help you can give me would be greatly appreciated.

    Calculation options are in the text field. In this screen, you only need to set the value of exports to the amount this box represents.

  • OBIEE reporting requiremnt:Display image based on the value of result report

    Hello


    I have an OBIEE reporting requirement, the report displays the result out of 10 based on a value selected in the command prompt dimension, what I want is if the score is less than 5, the image of warning should appear right in the report score with a sufficient distance and if the score is greater than 5, I want a right image tick.

    It will be a great help if someone will give me the solution as soon as possible, because I have a very urgent need.


    Thanks in advance.

    It took 3 clicks to hide the structure of the table...

    For the "how to return an image of the formula in the column" it's just the data format of the column that should be set to the URL of the Image and your column value must be the URL of the image. If you add a formula as CASE WHEN your_condition THEN 'http://.../picture1.jpg' WHEN your_condition_2 THEN 'http://.../picture2.jpg' END

  • How to conditionally display images based on the values of the variables

    I am building a demonstration Captivate containing a slide branching that allows the user to choose which way they want to view; Once they are done, they come back on this slide branching, and I want a check mark to display the button/path that they have already completed.

    I'm new to the use of variables and actionscript in Captivate, so I went the the documentation and the creation of variable is clear, as well as the use of conditional constructions, but I didn't know the instructions of scripts that look like they will allow me to display an image from the library when she is called in the conditional.

    Is this possible? If so, a pointer to an appropriate documentation or sample code would be greatly appreciated.

    Thank you

    Josh

    Hello

    When you insert images of the box, you click the Options tab and give the image a name that you may recognize. Then clear the Visible check box. This allows to keep hidden until you want to show it.

    However, note that even if all the image names are listed in the dialog box advanced Actions as being available for show, you will only be able to show an image if you run the fast Action of the blade where the image exists. So you will likely build a means by which you are setting up a variable to indicate that a section has been visited. Then create an action that is performed on slide enter to show the images based on the values of the variables.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • dynamically display title based on the value selected in the column picker

    Hi all
    Would it be possible to display the title of the dynamic report based on the value selected in the column picker. Suppose I have two State of the column and region. When I choose the status in the column picker the title of the report will show 'Summary of the situation' when I'll choose the region then the title will change to "summary of the region. Please help me...

    Hello

    Check your mail before I send the entire process with screenshots.

    Concerning

    NGO

  • How do I display values skyrocket in the IR filter for the joined table columns?

    Hello

    I have a problem in the IR the query is based on a table, joined with other tables. I would like to provide users the ability to use IR filter search bar in the joined table columns. The problem facing on this filter, the Expression field, by pressing the arrow button displays values for the fields in the primary table, but not for fields that come from joined tables. Have you experienced this behavior in your reports? Is this normal?

    TIA

    Hello

    Correlated subqueries can improve performance - but it does not depend on the involved tables, the number of columns and the existence of indices. As far as I know, the optimizer has problems with them. You could try to explain the Plans on the two statements to verify that.

    In any case, I created a new test page with the SQL for IR:

    SELECT E.EMPNO,
    E.ENAME,
    D.DEPTNO,
    D.DNAME,
    E2.EMPNO "EMPNO2",
    E2.ENAME "ENAME2"
    FROM EMP E, EMP2 E2, DEPT D
    WHERE E.EMPNO = E2.EMPNO(+)
    AND E.DEPTNO = D.DEPTNO(+)
    AND E2.PRIMARY_EMPLOYEE(+) = 'Y'
    

    http://Apex.Oracle.com/pls/OTN/f?p=267:226

    As far as I can see, it works properly - except that if I do a filter on the ename column, when I try to create a second filter, drop-down lists ename all the values, while the other columns list only the available values after having applied the first filter. Which seems strange that the filters are applied as ANDS. But it does the same thing for other areas - IE, the field used in a filter is not filtered for the second filter - so I guess this is normal, but only a person in Apex could probably explain why it is so.

    Otherwise, everything seems to work as I expect and the above page works the same as my test page, which uses external joins http://apex.oracle.com/pls/otn/f?p=267:224

    Andy

  • The default value based on the field from another table to a custom object

    I'm trying to set the default value to a field in the custom object to the value of a field of account. I tried the syntax 50 ways different and just don't get the case. The label for the account field displays the form of s/n, the integration of the tag is ltDBA_ACCT and it appears in the fx reports area as Account.Text_22.

    The field of custom object that I am triying update is also called s/n, which was originally the required field 'NAME '. The name of the table, account, should it be included? Do I need a function to the field?

    I've updated the external ID using the line with syntex < ID > ID (at least higher ID) so I know that it is possible to define a default value, but s / < n >, < ltDBA_ACCT >, 'account '. "" S/n "and so on are simply not working.

    If anyone knows how to get into what I would be really grateful for the help.

    OK, so if you default a field to the value of another object, you must use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure you do.

    Then this won't work by default if the folder is created from the object that you want to join the because a default works in record creation and the ID must be available so that it works correctly. It will not work if you choose the record of the related object after that registration of the custom object is created. You can set the default after, but that does not meet your requirements.

    The syntax of the default are the following: JoinFieldValue (ref_record_type, foreign_key, field_name).

    In your case, ref_record_type is '', foreign_key is [] and field_name is ''. The best way is to determine what is the name of the field to create a new workflow for the account and use the Workflow Rule Condition expression builder to choose your field ("DBA") in the list. The value returned by the expression builder must be placed in the field_name variable in the function JoinFieldValue (minus the parentheses and quotes).

    Give it a shot and let me know how you do.
    Thom

  • Possibility to get a popup to display the display value "" and not the "return value".

    Version - Application Express 3.2.1.00.11

    I have a list of values that exceed 1500 files and am so impossible to use a Select list.

    When you use a popup lov after choosing the recording, apex displays the return value (in my case a number). Is it possible to let him use the display value (in my case, a text string).

    Concerning

    Ben

    Benton says:

    Version - Application Express 3.2.1.00.11

    I have a list of values that exceed 1500 files and am so impossible to use a Select list.

    When you use a popup lov after choosing the recording, apex displays the return value (in my case a number). Is it possible to let him use the display value (in my case, a text string).

    See limiting the number of values in a LOV

    If it comes to a page element, and then change the type of Popup LOV key.

    If there is a control in a table, it's another reason to upgrade to a supported version, or the tabular form will need to be converted to be manually generated and processed in order to allow the appropriate control be returned using the apex_item.popupkey_from_lov method

  • How to disable the LOV values based on the State of some?

    Hello

    I have a requirement like this.

    (1) LOV Field (1), when I get a value here then based on the query I get two new values and assign to another two LOV Fields (2,3) and then disable them. However, when I enter the value in the field LOV (1) based on one of the conditions I won't have no default value then LOV fields must be enabled so that the user can select the values of LOV.

    (2) now an another LOV domain (4) when I go here again, then again two fields a LOV (5), and the free text field must be filled in.

    To do this, I wrote the logic in the following way:

    (1) get the LOV box-1 value and deriving the new values and set the session Variable to 1 and then refresh the Page. Now in PR get the Variable from Session 1 and assigning new values to LOV fields 2 and 3 and then using the property Setdisabled I deactivation.

    (2) getting the value of LOV field-4 and then drifting two new values and set the session Variable-2 and refresh the Page. Now in PR get Session-2, and then set the new values for the LOV-5 field and free text. But once the Page Refreshed and assigning values, values that we have given in the Point 1 in the LOV-2 fields, 3 turn white and field's get activated.

    Can you please let me how to achieve this? and also why the values are empty when I implement Point-2.

    Thank you
    Clarriiza

    Clarriiza,

    This VO have no matter what right SQL query, so even if you run the VO by using vo.executeQuery (), you will not get all the lines in the VO.

    So in the PR you need createRow and insert VO (otherwise your page no mistake) the below blog can be considered as an example.

    Reference: Oracle tips of Johny: OAF: how to create a PVO and use for Spel link in Oracle Application Framework

    On top of which is explained in the blog above, you set the values for the attributes of the useful, likely to set the value for the other LOV.

    I hope this helps.

    See you soon

    AJ

  • Display Images based on the URL of the site

    Hello! I'm working on a project and I want a different logo image to appear on the first slide in a captivate course based on the URL of the site. I wonder if there is a way to do this and that this would imply. Thanks in advance!

    Then it should look like this:

    /* Convert the web address to lower case for comparisons sake */
    var webAddress = window.location.href.toLowerCase();
    
    /* Check if the web address contains part of the URL name */
    if(webAddress.indexOf('victortechnologies')>-1){
      /* The Web Address contains "victortechnologies' so set the Captivate User Variable to 'Victor' */
       window.cpAPIInterface.setVariableValue('vImageToDisplay', 'Victor');
    }else{
      /* The Web Address does not contain "victortechnologies' so set the Captivate User Variable to 'Thermal' */
        window.cpAPIInterface.setVariableValue('vImageToDisplay', 'Thermal');
    
    }
    

    So you should use a conditional tip Action 2 steps at the entrance to the first slide to:

    • Run this JavaScript (1 set = 1 for the State)
    • Check the value of the variable user vImageToDisplay and show/hide the appropriate image.

    Note that you will want to check if vImageToDisplay is equal to 'Victor '.  I was using "HTML5" in my action below because my images are different.

    I've tested this and did not run in synchronization problems.

  • Get the value based on the column names for the custom of the Webcenter content metadata field

    University Complutense of MADRID, I created a custom text metadata field.  I then activated optlist this area.  I fill the optList values, I use a view.  The view has three columns.  Let us call their ID, Key, Value.  OptList shows keys in its list.  I then create content (Content ID: MyContent) Webcenter content and choose the OptList values for my new field of metadata (MyField).

    WebCenter portal, I'm filling a selectOneChoice with MyField values in the content ID: MyContent.  Remember the previous step, the values entered in selectOneChoice lists them selected values from the field MyField optList.  The optList is filled from view.  After the user selects a value in selectOneChoice, in Javascript, I need to alert a message in this format "selected value - matching value from the view of the optList that fills MyField.

    In my opinion, only an example will be useful:

    This is a view that I created in Configuration Manager applet in Webcenter content Admin cmdlets :

    ID | State | Capital

    1. North Carolina | Raleigh

    2. California | Sacramento

    3. Illinois | Chicago

    Then I create a custom field (name: MyField).  MyField is an optList values are filled with view created above.  Internal value and the display value are the two State.  Then I have a new content with Content Id Check-In: MyContent.  To MyContent, I select these values in OptList MyField: {North Carolina, Illinois}.

    In my portal Webcenter application, I create a Taskflow presenter content.  I have set up as single content item presenter.  I attribute as content ID MyContent.  Then, in templateView, I get all the values of MyField in MyContent and display as selectOneChoice.  I created a javascript function that would get the value that the user selected in selectOneChoice.  In the view created in the Webcenter content Configuration Manager (see above), there is a value corresponding to each displayed value.  So, for the selected value, I need to get the corresponding Capital and display in my alert message.

    Starting from Javascript, how can I get the value of the Capital, since I have the status value.

    Hello.

    The idea to reach your requirement is planned:

    • Create an Assistant manage bean that will appeal as access map: #{stateUtil ['Calofironia']} (it will return Raleigh). This value will get calling GET_SCHEMA_VIEW_VALUES IDC service using RIDC in your managed bean.
    • Pass the result of #{stateUtil ["statename"]} to your JavaScript function to help

    I hope this information help you.

    Kind regards

Maybe you are looking for

  • ITunes will not sync my files on my phone

    I recently updated my iPhone 5S for a 6s. We have backed up all my files to the store and transferred a few months ago. No problem. I used my phone regularly since then without adding new songs, but recently I pulled a couple my computer I wanted to

  • My Toshiba L10 will not start!

    Hi all My Toshiba L10 (3 months) will start not especially when transported from one workplace to another. I have this problem more and more frequently. I'm so worried. Could you please tell me if it is an indicator of a serious problem with my compu

  • A6511.uk Pavilion: Pavilion a6511.uk windows 7 64 bit upgrade

    I have improved my a6511.uk Pavilion from Vista to Windows 7 32-bit of the disk to upgrade without problem and been running this for a few years now. I installed 2 additional 1 GB memory DIMM in the slot 3 and 4 to take up to 4 GB, as indicated by bo

  • replaced the monitor number invalid svc code

    Hello, I recently gave in my Dell UltraSharp U2913WM to repair his apparently broken screen matrix and I learned by the official authorized repair center that dell would repair her, instead, they embarquerions me a new. I got the monitor in a fortnig

  • Pls explain the sense of source and destination SVI ACL

    Hi I have a home network up and well running that uses a Cisco 1801. I'm just trying to increase my understanding of some is the config and I'm confused by ACL on an interface VLAN. OK so I "be the router" and imagine packets flowing to me and me I h