Display Values Based on Flag

version oracle 10g
hi i have a template in a variable and i need to show or hide some lables based on some values.
i have an example below .copying the output of the below example.
i have many lables which i need to show or hide based on the label values. 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 row prior to the REPLACE statements;
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

Similar Messages

  • Usage question about Default Display Value based on calculation

    Hi,
    I read on page 3-70 of the devguide about using EL for Default Display Values.
    I want to something similar as the defaultSalaray based on some kind of calculation. There is stated to store the value on the request or session (request is fine for me).
    I'm only wondering how I can put some infromation like this on the request using JHS.
    Regards,
    Marcel

    Marcel,
    This requires custom code in a JhsDataAction subclass. For example, you can overwrite method handleLifeCycle, and before calling super you can add a request attribute:
    actionContext.getHttpServletRequest().setAttribute("defaultSal","23000");
    Alternatively, if you have a business service method that calculates the default salary, you could create a separate DataAction, drag and drop this method on the data action, and add a success forward to your data page action. In the DataAction you can configure the method result location (requestScope, sessionScope). This way, you do not need to write java code.
    Steven Davelaar,
    JHeadstart Team.

  • How to display value based on LOV selection

    Hi,
    I have an editable table. On create operation one of the field is LOV, based on LOV selection the next field should be auto populated, please help me how to achive this.
    Thanks,

    Thanks for your reply........
    I did all these to get value based on LOV selection, but my problem is when i am trying to create a new record then everthing is working fine but normal search i am not getting the value of that attribute.
    below is my code
    Page:
    <af:column sortProperty="ProcessType" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    id="c36" width="340px;">
    <af:inputComboboxListOfValues id="processTypeId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    value="#{row.bindings.ProcessType.inputValue}"
    model="#{row.bindings.ProcessType.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.ProcessType.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.ProcessType.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.ProcessType.tooltip}" inlineStyle="width:800px;"
    valueChangeListener="#{backingBeanScope.backing_app_CalcSchedules.weeklyDescription}"
    autoSubmit="true" >
    <!-- <f:validator binding="#{row.bindings.ProcessType.validator}"/>-->
    </af:inputComboboxListOfValues>
    </af:column>
    <!--value="#{row.bindings.Description.inputValue}" backingBeanScope.backing_app_CalcSchedules.description-->//If i use this value in the below property line then i am not getting value while creating time but if i done blind search then i am not getting any value in this field.
    <af:column sortProperty="Description" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.Description.label}"
    id="c35" width="390px;">
    <af:inputComboboxListOfValues id="descriptionId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.Description.label}"
    value="#{row.bindings.Description.inputValue}"
    model="#{row.bindings.Description.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.Description.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.Description.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.Description.tooltip}" inlineStyle="width:1000px;"
    readOnly="true" partialTriggers="processTypeId">
    <f:validator binding="#{row.bindings.Description.validator}"/>
    </af:inputComboboxListOfValues>
    </af:column>

  • Query on DSO, KF value +/- based on flag value in DSO

    Hi Experts,
    I have a query on DSO and it is running fine.
    Current Query output :
    CHAR1 | CHAR2 | KF1
    1111       S            100
    1111       H            100
    I want to put + or - sign for KF based on value of CHAR 2 (Flag) in query output.
    So
    Desired Query output :
    CHAR1 | CHAR2 | KF1
    1111       S            -100
    1111       H             100
    I can Add CHAR3 in DSO and based on CHAR2 value CHAR3 will store +1 or -1. Add it can be used to get + or -Value of KF using CKF.
    But without doing it (CHAR3), can I do it directly at query level ?
    Regards,
    Vinod

    Try this:
    RKF1: KF restricted on S
    RKF2: KF restricted on H
    CKF: (-1)*RKF1 + RKF2
    This should give you what you are looking for.
    Regards,
    Gaurav

  • Formula to Display Value Based on Another Field's Value

    Hello,
    I have a column that displays the vehicle used for drives, but the report also lists fixed sites that do not have a vehicle assigned.
    What I'm trying to accomplish is to utilize a formula but I'm having trouble with getting it to work. What I've got is:
    if {CenterDetail.CenterType}=0 then {MobileSetupMaster.ShortDesc}
    else
    I'm not sure what to place in the else statement to make the value equal to null.
    Suggestions?

    hi Trey,
    are you just trying to show an empty formula or an actual null.
    if empty, then
    if {CenterDetail.CenterType}=0 then {MobileSetupMaster.ShortDesc}
    else ""
    will work.

  • AdobeHCM P&F-Able to fill positions dropdown,unable to display values-EP3

    All,
    I am able to populate the positions in drop down . I am seeing the all the positions, now when my form load I have to select one position and populate the rest of the DISPLAY values based on position. E.g. Company code, text , job key , job text . I have generic service which have all the fields . I added them on my form , but when I am choosing position from dropdown , nothing is populating .. I`ve used operation "GET_COMPANY_CODE_FOR_POSITION" . Any clue why ?
    I exactly did the following , I am calling script event USER_EVENT_CHECK on CHECK .
    But nothing is coming up .
    Note : I donu2019t have any button , all I have is dropdown for positions
    Re: HCM forms and Processes - Adobe
    Please Advice.
    Thanks,
    Khan

    Still NOT WORKING ...........!!!
    Yes , it was easy and a smart way to trigger event .  I always knew you are smart guy
    Here is what I`ve done
    1- Populate dropdown for position via standard service "S_MGRS_POSITIONS" , bind this with SAP_PA with the same name I0001_PLANS.
    2- Yaaaay! I can see the position in dropdown great -- Next step
    3- Based on the position selected from drop down , I have populate and display 12 fields with their text from OM side .
    4- I have created a generic service "ZS_POS_ATTRIBUTES" , import all the fields with their names e.g company code,job key , org unit , cost center , etc etc .. Including "effective date" .
    5 - Per you reply I have drop button from ISR library which created all code for me and I commented the script for visible & invisible on FORMREADY. ( Able to hide button )
    6- Copy mouse down / click ISR code  and plug that in on change EVENT of my dropdown
    //Set ISR_EVENT for BAdI processing in backend
    $record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_CHECK"
    //Trigger call to backend for BAdI user command processing
    ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
    7- I have a user event called "USER_EVENT_CHECK "  which have all the fields for display including Action , effective date ( thanks a lot for your blog ) help  me a lot  to understand USER EVENT
    8 - Now When I am loading my form via MSS  After picking position , it is not doing any thing ( I also put break point for my custom back end service , but it is not stopping at all )
    9 - Humm, I thought , lets execute HRASR_TEST_PROCESS to make sure it is populating position F4_HELP value. Guess what , after hitting "F8" Execute , I didnu2019t see any positions F4 , but the moment  I clicked "CHECK" , it not only triggers my custom backend service but also come back with positions . I choose one position out of 7 positions and it again went to debugging mode .
    Why I am unable to see the values for the slected positions 
    Please advice .

  • Is it possible to change the display value of a domain-based attribute?

    Hello,
    I've selected a domain-based attribute for one of the leaf member attributes in the same entity, aka parent id, since it's a self-referencing entity.  However, I cannot find a way to display anything but the code value in the drop-down (see below).
    Is there a way to change the display value so that I can choose the attribute from the entity from which I want the user to choose? In other words, I would like to display the hierarchy name instead of the code, which is really just the primary id.
    Thanks in advance!
    Ben Lezin

    1. In the explorer page, settings dialog, you can change the display format to show only name.
    2. We cannot use other freeform attribute as DisplayFormat, rather than Code Name. So there are 2 option here:
    a. Remove HierarchyName attribute and just use Name attribute. In the next release, we will allow give Name, Code attribute a displayname, so you can give Name display name as "HierarchyName" in the SQL Vnext release.
    b. Make a Business Rule to update Name when HierarchyName is changed.

  • How to retrive new logical column based on flag values in table.

    Hi,
    i have two tables in rpd
    1.file table contains the coulmns------->date,file_count,record_count,cldm_stg,cmsa_stg,archive_stg
    2.rejection table columns---------> are same as above
    both have same common columns.my requirement is publish a dashboard like:
    date | land_files count |alnd_recordscount| target_files count|target_records count|Rejection filecount|rejection record count
    These report ineed retrive from those two tables.based on flag values.taget countcomes when all stg values set to ='y'
    i.e(cldm_stg='y' and cmsa_stg='y'and archive_stg='y') if not then it will be in rejection file.
    Please give solution how to achive my output.
    nQSError: 14026] Unable to navigate requested expression: Target_record:[DAggr(FILE_CONTROL.Target_record by [ FILE_CONTROL.FILE_NAME, REJECTED_FILES.FILE_NAME, REJECTED_FILES.NO_OF_ROWS, File_landing.NO_OF_ROWS, File_landing.FILE_LOAD_DATE] SB FILE_CONTROL)]. Please fix the metadata consistency warnings. (HY000)
    Edited by: user8767586 on Jan 12, 2010 4:29 AM

    Tanks for ypur reply .only two tables are there named as above.i taken file_control as a fact table.
    and i create one new tablecalled target in bmm layer taking logical source as file_control(fact table). and iset the where clause for the new table.and i create a new measure called target_file and target_records.in where clause my query is like
    dwbidb."".AUDIT_PROD.FILE_CONTROL.ARCHIVE_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.CMSA_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.LND_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.SCRIPT_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.STG_STATUS = 'Y'
    please tell me if this is right way to achive mt report. and tell me difference between fragmentation and whereclause.for my requrement i ahve to follow which method either fragmentation or whereclause.and in rpd there are no errors and warnings.but in answers i get a follwing error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: TARGET_FILECOUNT:[DAggr(TARGET.TARGET_FILECOUNT by [ TARGET.FILE_NAME] SB TARGET)]. Please fix the metadata consistency warnings. (HY000)
    SQL Issued: SELECT TARGET.FILE_LOAD_DATE saw_0, TARGET.TARGET_FILECOUNT saw_1, TARGET.TARGET_FILECOUNT saw_2 FROM AUDIT_PROD ORDER BY saw_0.
    Please tell me to achive my report.
    Regards
    Edited by: user8767586 on Jan 12, 2010 5:21 AM
    Edited by: user8767586 on Jan 12, 2010 5:21 AM
    Edited by: user8767586 on Jan 12, 2010 5:24 AM

  • Conditionally display items based on null LOV value

    Hello,
    I've seen several examples that do what I'd like to do but with different implementations. Perhaps someone can steer me in the right direction...
    I have a pop-up lov that pulls a list of names from various places. If, however, the name cannot be found I'd like to display a few text boxes where the user can enter a new name.
    For my list of values I have configured the following:
    Display Null: Yes
    Null Return Value: -1
    Null Display Value: Not Found
    My HTML Form Element Attributes has: onchange="doSubmit()";
    My Source section has:
    Source Used: Only when current value in session state is null
    Source Type: Static Assignment (value equals source attribute)
    My entry text boxes have a condition specified:
    Value of Item In Expression1 = Expression 2
    Expression 1: P4_LOOKUP_NAME
    Expression 2: -1
    I also have an unconditional branch to this same page (Page 4) that sets the value of P4_LOOKUP_NAME to P4_LOOKUP_NAME.
    I cannot seem to get this item to display though...any thoughts?
    Thanks in advance for your suggestions!

    jhammer,
    I like the concept. This would require a custom popup lov - something that can be a little tricky/time consuming the first time around. The popup lov would probably have to create new entries via Ajax to be able to pass back the correct ID/display values to the parent window on close.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Change display value of "select list"

    Hi!
    I have a problem with a select list, I want to change the display value through an own pop up (page 5 of apex application) after I submit in it.
    The select list is based on a sql query:
    select A_NAME display_value, A_ID return_value
    from APPLICATIONS
    where a_application_type='GROUP'
    order by 1
    beside I have an link to open a pop up window:
    ... onClick="window.open ('f?p=&APP_ID.:5:&SESSION.::::', 'newWin',
    'scrollbars=no,status=no,width=500,height=270' ...
    On the pop up site there is a tree and a submit button which close the window and renew the original page:
    javascript:window.opener.location.reload();window.close();
    Through the tree I get the value (Group-ID) which I need.
    When I'm back on page 4 a "before header" renew page process links again on the side 4 and change the value of my select list. Afterwards the values have changed correctly but the display value is still the old one. It only change when i go on an other page of the apex application and come back.
    I don't know why it doesn't change immediately!?
    Thanks ahead

    I have done with a solution just in a nutshell of what u r looking for:
    1.create HTML region.
    Add two items : Select list with redirect(P6_X) and text field(P7_X)
    2. Select list is based on LOV query as :
    select empno d,empno r from emp ;
    Source value is Empno Type:DBcolumn.
    3.The text field Source type : SQL Query .
    Query : select ename from emp where empno = :P6_X
    Now select from the dropdown empno and it will populate the Ename value accordingly based on the query .
    U can have more than one text fields and populate those in the same way.....
    Cheers,
    ROSY

  • Multiple values based on LOV in report

    Hi,
    I have a checkbox on a form where I can select values like e-mail, fax, post.
    And then I have report that has a column for confirmation type that is based on same LOV as the checkbox.
    The problem is that wen there is one value selected it shows correctly in report that e-mail for example. But when I have multiple values there it shows P:E only not Post, E-mail as it should. So when there are multiple values it shows only LOV return values not display values.
    How can I get it to show display values instead of return values when there are multiple values (Post, E-mail instead of P:E)?
    Thank you a lot.

    anyone?

  • Display value in custom field selection of standard field

    Hi,
    I want to display the country value based on the Account selection, that is the country associated with the selected Account.
    I created Contact extension BO and added country field with data type CountryCode. Account is a standard field.
    I am able to fetch country value but assigning the value to Country field can be done in only BeforeSave.absl
    I have also provided validation for this country field.
    Issue here is:
    First Validation-OnSave.absl gets called and then BeforeSave.absl.
    I want the country value to be displayed once the user selects Account.
    Regards,
    Vijaya Chavan

    Hi Vinod,
    I got the issue.
    AfterModify.absl gets called when the Contact Quick Create screen gets loaded and not after selecting the Account field value.
    So I tried geting the value directly from the following path without firing a query in BeforeSave.absl.
    this.CurrentDefaultIsContactPersonFor.BusinessPartnerRelationship.FirstBusinessPartner.AddressInformation.GetFirst().AddressSnapshot.PostalAddress.GetFirst().CountryCode;
    But BeforeSave.absl gets called when I click on "Save". I wanted the value to be displayed soon after the Account Value is selected.
    Regards,
    Vijaya Chavan

  • Display 0valstckval based on storage location (Inventory)

    Hi all,
    I need to display 0valstckval in webi report based on storage location. Now this valuated stock value comes from revaluations (2lis_03_um) and can be send at the report level based on plants but not on storage location. I know this is how the standard process is. Is there any way we can report the val stock value based on storage location in report?
    Thanks

    Hi
    You need Append the structure for the UM Datasources and you write the code and can retrieve based on STOR_LOC.
    BTW, are you not using Datasource BF-Material movements for Inventory?

  • How to populate table of values based on selected value of dropdown list

    Hi
    I have an urgent requirement.
    Whenever I select a value in Dropdownlist, Based on the selected value I need to display serveral values in tabular form.
    I have created a dynamic LOV and created the actionListener
    I have created a table by dragging the ViewObject and i have set the partialTrigger attribute value to the LOV Id.
    Now My doubt is What should I return in the actionListener method
    Thanks

    Hi,
    So get the value what i tried is ,bind the list item of the select one choice ,
    and then i used the method something like this
    UISelectItems see=getSelectItems1();
    System.out.println("Selected Value"+ see.getValue());
    but it returns me something like this
    Selected Value[javax.faces.model.SelectItem@b20090, javax.faces.model.SelectItem@431753]
    Don't know what are those ,hoe can i get the display value.Please help.
    Thanks

  • Value based hierarchy 11g question

    Hi,
    in my BMM i've created a level based hierarchy composed of two levels: TOTAL and Audiologist
    Total level is setted as Grand Total level and doesn't have logical columns.
    At audiologist level insted i drag and drop two logical columns: Audiologist Code and Audiologist Name
    Then i created two keys.
    First Key: Audiologist Code - Use to display: None
    Second Key: Audiologist Code and Audiologist Name - Use to display : YES
    Graphically my hierarchy is as follow:
    Total-----
    Audiologist
    Audiologist Code
    Audiologist Name
    Now i would like that if i drill down Total appear simultaneously two columns: Audiologist Code and Audiologist Name.
    Is it possible? I remember that in 10 it was.
    It's quite urgent.
    Thanks

    Based on my experience of OWB10gR2 the option to create a "Value Based" hierarchy is only enabled if you create an AW based OLAP model. If you want to create a ROLAP model then I do not think this is possible.
    Question is why create a ROLAP model when you could get better performance and more powerful analytical features by using a multidimensional model within an analytic workspace.
    Keith

Maybe you are looking for