Dynamically set the sequence of an Item

Hi,
I have three record types and am trying to dynamically set where it appears on the form.
The 3 record types are MEETING REGISTER, MARKET PROBLEM AND BROADCAST CHANGE.
If the user creates a record with a type of MEETING REGISTER then I want a field called 'duration' to have a sequence of 57, if it is either of the other 2 types then I want it to appear further down the form with a sequence of 241.
I have tried creating a dummy text item called 'P2_DURATION_SEQ' at the top of the form with a default function of:
declare
v_dur_seq NUMBER;
BEGIN
IF :P2_RECORD_TYPE IN ('MEETING REGISTER')
THEN v_dur_seq := 57;
ELSE v_dur_seq := 241;
END IF;
RETURN v_dur_seq;
END;
and tried putting &P2_DURATION_SEQ. in the sequence field of the duration field properties with no success.
Any advice would be great.
Thanks
Chris

Hello Chris,
If you have just the one field, or just a couple, that needs to dynamically change sequence (I wouldn't suggest the following if you have many because it could become quite a maintenance headache), you can try this:
1) Define three "duration" fields, say P1_DURATION_MR, P1_DURATION_MP and P1_DURATION_BC. Define their sequence to display wherever each needs to be, respectively.
2) Map all three to the same database column.
3) Make each conditional on the record type being "MEETING REGISTER", "MARKET PROBLEM" or "BROADCAST CHANGE" respectively.
Then, if the record type is "MEETING REGISTER", P1_DURATION will render where it needs to and the other two will not render, etc.
Hope this helps,
John

Similar Messages

  • How to dynamically set the name of the generated PDF file sent by email

    Hello,
    I am using Reports 10g and I managed to send PDF reports by email, specifying the recipient, subject, format etc, using the reports servlet URL.
    But there is one thing that I cannot find a way to do: I want to dynamically set the name of the attached file. It defaults to the name of the RDF file (eg monthly_sales.pdf). I would like it to be something more meaningful (eg monthly_sales_072010.pdf, where 072010 is the month and year passed by parameters).
    Is it possible to do it?
    Thanks
    Luis

    Use System.load(...) instead of System.loadLibrary(...).

  • XSL-FO Report Query / Named Layout - Dynamically set the output filename

    Does anyone know if it is possible to dynamically set the name of the PDF file which is created via FOP?
    Thanks
    Paul

    John
    Thanks for the quick reply, apologies, I should have been more explicit.
    I am calling apache FOP via a report query and a named column layout using xsl-fo to format the PDF report.
    The call is done via a javascript function which determines which report to print and then submits the approproate REQUEST. The request is picked up by conditional branches and calls the PRINT_REPORT
    The PRINT_REPORT names the PDF file as same as the report query name.
    BTW the long term goal is to store the resultant output as a blob back in the database but I can put that off to phase II of the project as I'm not sure that this is possible. Would be nice though!
    Thanks
    Paul

  • How do you dynamically set the flat file name

    Within my process flow I call a mapping. Within this mapping I have a flat file operator (which creates and writes to a .csv file). All working great.
    From this process flow I want to be able to pass a parameter to the mapping (which I can do), and use the value of this parameter as the file name of the .csv file. But I can’t seem to be able to dynamically set the ‘Default physical file name’ to this parameter value within the mapping.
    Does anyone have any ideas?
    Thanks
    Ansel

    Hi Ansel
    Check out the blog entry here;
    http://blogs.oracle.com/warehousebuilder/newsItems/viewFullItem$154
    You can use an expression.
    Cheers
    David

  • Online Store 1.0  - which process set the value of App Item 'FULLNAME'

    Hi,
    I just very curious about which process set the value of App Item 'FULLNAME' ini the packaged Apex App - Online Store 1.0 .
    At Navigation Bar, there is a entry named "If you are not &FULLNAME., Click here |". However I can't find how the app set this application item value in any process when login.
    any idea, I will be very appreciated.
    Thanks in advance.
    PPMonkey

    Check the post-authentication process in the current authentication scheme and the call to ols_getname.
    Scott

  • How to set the value of application item using pl/sql in application process

    Hi guys,
    I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
    Please help.
    I am using apex 4.2
    Regards,
    Waqas

    You can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
    For example
    BEGIN
        -- assign like a variable
        :G_MY_APPLICATION_ITEM := 'LARRY';
        -- use in a SQL statement
        SELECT WHATEVER_COLUMN
          INTO :G_MY_APPLICATION_ITEM
          FROM MY_TABLE
         WHERE USERNAME = :APP_USER
    END;
    Peter

  • Is it possible to set the child index of items in the design view?

    Is it possible to set the child index of items in the design view? I have a large png that is on top of everything in design view which is really annoying

    Yes it is possible to do so. Goto View>>Tools Pallete. This will open up a tools pallete which you can use to modify the colours and other viewing options of graphs and anything else on the front panel.
    For your purpose u select the background of the graph and  click on the "set colour squares" present in the lower bottom corner of the pallete. This will open up a whole range of colors you can select for the purpose. There in the black and white strip of colours, there is a box titled "T" on the right most corner. Select that "T" and your background color will go transparent.
    Have a nice day. Happy codings.
    Regards
    Asad Tirmizi
    Design Engineer
    Institute of Avionics and Aeronautics
    " Its never too late to be, what u want to be"
    Using LabVIEW 8.2

  • How do i dynamically reference the contents of an item in a where clause

    I have a select statement that references an item i.e. 'where sysdate=:diary.day1' at the moment, however i want to use this select to loop through every day of the week, so on the fist record it will change depending on where you are in the loop either 'where sysdate=:diary.day1' or 'where sysdate=:diary.day2' etc. I tried using a variable for this but it just uses the characters ':diary.day1' and not the contents of this item.

    Not sure what you want but dynamic reference the content of an item may be done with NAME_IN builtin.
    WHERE sysdate = TO_DATE( NAME_IN(var), 'fmt')
    where var is a variable which contain item name, for example 'DAIRY.DAY1'
    P.S. SYSDATE function contain not only date but time portion too.
    So very little chances that this equation will be true

  • Dynamically set the upper limit of a numerical control

    I want to dynamically setting the upper limit of a numerical control. The maximal value that is allowed to input is calculated by the code, so that if the value input by the user exceeds the upperlimit,  a warning comes out and the input value is automaticaly reset to zero.
    I wired the calculated upper-limit to the property node of the numerical control using ''Data Range > Maximum" property, but it does not work as I expected.
    Anyone has suggestion on this? Thanks a lot.

    Can you attach your code?
    Dejun wrote:
    ... but it does not work as I expected.
    I cannot read your mind. What do you expect? What to you see instead?
    Overall, you are in a catch22 scenario if I understand you right. If you set the max of the control to coerce to a certain value and you enter a larger value, it will be coerced to the upper limit and the code does not see the original out-of-range value and you cannot successfully test it with a comparison operation. Maybe you can set it to "ignore" instead of "coerce" or not even set an upper limit. Simply use "in range and coerce" and reset the value under the desired conditions (e.g. via  a local variable) before handing it to the rest of the code. You could even wrap this into an xcontrol.
    LabVIEW Champion . Do more with less code and in less time .

  • Setting the sequence of asset listeners

    Hi All,
    We have about 10 asset listeners and would like to have them execute in a specific sequence. I have contacted Fatwire Support and I got the standard answer:
    "There is no documented way to specify ordering of asset listeners. If order of asset listeners is a concern, you could put all the asset listener code into one asset listener"
    Obviously, putting all the listener code into a single listener is less than ideal. I'd like to know if any of you have been able to find a way of reliably setting the sequence in which the asset listeners are executed.
    We tried the obvious approaches of ordering the listeners in our AssetListener_reg table using ID, insert order, etc but they have not proved reliable.
    One option we are considering is to write a single listener that is responsible for invoking the existing listeners rather than rely on Fatwire to do this.
    So, if we don't have to write custom code to do the obvious, I'd like to know what has worked for others.
    Thanks,
    --Adi.

    Hi,
    Sadly the queries that retrieve listeners from the listener tables don't specify an ordering, e.g.:
    select id from AssetListener_reg where listener = ...
    select listener from AssetListener_reg where blocking = ...
    In Oracle DB there is no way to reliably predict or influence the ordering that comes back from a query, except by using an explicit ORDER BY. See http://stackoverflow.com/questions/899514/default-row-ordering-for-select-query-in-oracle for more description on that.
    It does seem like it could be useful to determine the order so I have logged enhancement request 16998818 "ALLOW FOR ORDERING OF ASSET LISTENER EXECUTION" for this.
    Regards,
    Phil

  • Dynamically set the size of the VIEW

    Hello,
    I am looking to set the size of my VIEW which is called in following way:
    IF iv_show_in_pop_up EQ abap_true.
        wd_this->raise_simulation_pop_up( ).
    I want to set of the size of the VIEW if it a pop-up.
    ENDIF.
    How can i get access to the view and set the size. Please Help.
    Regards,
    Piyush

    Hi Piyush,
    Check what Anzy has to say in [here|https://forums.sdn.sap.com/click.jspa?searchID=18635339&messageID=3289078]:
    "You have to go to specific view , which will be embedded in the pop up window.In the view go to ROOTUIELEMENTCONTAINER and set the width and height.This way you can restrict the size of the pop up window."
    This is [another approach|https://forums.sdn.sap.com/click.jspa?searchID=18635339&messageID=5836334] suggested by Abhimanyu Lagishetty for dynamically setting the size of your window:
    "Pass the URL like this to the create_external_window
    javascript:window.moveTo(0,0);window.resizeTo(screen.width,screen.height);window.location.href="http://google.co.in";
    Instead of http://google.co.in write your URL it will maximize the window"
    Regards,
    Uday

  • Dynamically setting the number of collumns...

    Hi,
    I have a report that I need to build. In the requirements I need to dynamically set the number of columns based on the parameters given. I have some ideas on how to do this by building the layout to include all the columns. Then show or hide them based on the parameters passed. I was just wondering if anyone has tried to do something like this? If so, were you successful, and what were some of the major stumbling blocks you ran into. Or if you know of any links to documentation that would help would be great.
    On a side note, would doing something like this be handled better if done in Discoverer? I have not used Discoverer before, so I'm not sure myself.
    Thanks,
    Tom

    Hi Tom,
    You will find useful information in these notes on Metalink:
    261313.1: How to hide columns dynamically without blank spaces ?
    1074438.6: How to dynamically set labels based upon globals
    28533.1: How to create a dynamic report using lexical parameters for column names
    And a comprehensive guide to using lexicals (you will have to use lexicals for column names)
    115072.1: Complete Resource Reference for using Lexical Parameters in Oracle Reports
    Navneet.

  • Forming a report query dynamically with the value of an item

    Hi Gurus,
    We wanted to create a report based on the value of an item in the page.
    For example
    There is a text box named p1_table depending on the value of this item the query of the report should change
    1) when p1_table = emp then report query should be select * from emp
    2) when p1_table = dept then report query should be select * from dept
    I tried doing this using
    select * from :p1_table and select * from v('p1_table') , it is not working.
    Kindly help me in achieving the requirement.
    Thanks & Regards,
    Vikas Krishna

    Hi Vikas,
    You have to do this as a report based on a function that returns the query as a string. You build up the string dynamically in the function.
    Regards
    Andre

  • Dynamically setting the color of the title in a Panel

    Hello, I know I can set the color & font of the title in a Panel using the titleStyleName in a stylesheet.  How can I dynamically change the color though?  I have a component:
             <mx:Panel id="myPanel"borderColor="{this.color1}" />
    where this.color1 is a value that changes dynamically, and thus changes the border color.  How do I do this for the color of the text in the title?

    Hi,
    Try this
    var css:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".myPanelTitle");
    css.setStyle("color",0x00FF00);

  • How do you set the number of visible items in the popup box of a JComboBox?

    Hi,
    Do you know how to set the number of items that shall be visible in the popup box of a JComboBox?
    I have produced an implementation of an autocomplete JComboBox such that following each character typed in the text field, the popup box is repopulated with items. Normally 8 items are visible when showing the popup box. Sometimes even though the list of items is > 8 the popup box shrinks in height so that 8 items are not visible.
    Thanks,
    Simon

    Below is my JComboBox autocomplete implementation.
    The problem seems to occur when the list of items is reduced in number, the button selected and then the list size increased, the popup box does not automatically increase in size. I have tried setMaximumRowCount � but does not resolve the problem.
    To see how it works:
    1)     click in text field.
    2)     Type 1 � the full list of items are shown.
    3)     Type 0 � the list has been narrowed down � the popup box is greyed out for remaining items.
    4)     Type Backspace � the full list of items is redisplayed.
    5)     Type 0 � to narrow down the list.
    6)     Select button � the popup box is invisible.
    7)     Select button � the popup box is displayed with 2 items.
    8)     Select Backspace � here is the problem � the combo box list contains all items but the popup box has been shrunk so that only 2 are visible.
    9)     Select button � popup box is invisible.
    10)     Select button � popup box is as expected.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.util.Enumeration;
    import java.util.Vector;
    import javax.swing.plaf.basic.*;
    class Test
    private JComboBox jCB = null;
    private JTextField jTF=null;
    private String typed="";
    private Vector vector=new Vector();
    public Test()
    JFrame fr=new JFrame("TEST ComboBox");
    JPanel p = new JPanel();
    p.setLayout( new BorderLayout() );
    ComboBoxEditor anEditor = new BasicComboBoxEditor();
    String[] s = new String[30];
    for (int i=0; i<30; i++) {
    s[i] = (new Integer(i+10)).toString();
    jTF=(JTextField)anEditor.getEditorComponent();
    jTF.addKeyListener(new KeyAdapter()
    public void keyReleased( KeyEvent ev )
    char key=ev.getKeyChar();
    if (! (Character.isLetterOrDigit(key)
    ||Character.isSpaceChar(key)
    || key == KeyEvent.VK_BACK_SPACE )) return;
    typed="";
    typed=jTF.getText();
    fillCB(vector);
    jCB.showPopup();
    jCB = new JComboBox();
    jCB.setEditor(anEditor);
    jCB.setEditable(true);
    boolean ins;
    for (int x=0; x<30; x++)
    ins = vector.add( new String(s[x]) );
    fillCB(vector);
    jCB.setSelectedIndex(-1);
    fr.getContentPane().add(p);
    p.add("South",jCB);
    p.add("Center",new JButton("test combo box"));
    fr.pack();
    fr.show();
    public void fillCB(Vector vector)
    typed = typed.trim();
    String typedUp = typed.toUpperCase();
    jCB.removeAllItems();
    jCB.addItem("Please select");
    for(Enumeration enu = vector.elements(); enu.hasMoreElements();) {
    String s = (String)enu.nextElement();
    if (s.toUpperCase().startsWith(typedUp)) {
    jCB.addItem(s);
    jTF.setText(typed);
    public static void main( String[] args )
    Test test=new Test();
    Many thanks,
    Simon

Maybe you are looking for

  • Error while doing a File to IDOC scenario

    Hi Experts, I have created a File to IDOC scenario where in i have sent a file which has to pass data to ABSEN1 IDOC.I could see the IDOC reaching R/3 ,but with the status 56: "EDI: Partner profile inbound not available" I have checked with all the c

  • Business object and BW

    Hi gurus can any one tell the difference between  difference between a Business Object and Business Warehouse. Regards Arunkumar

  • SSL Cert - Auto Discovery

    Hi everyone,  I have two issues .... 1- I have ssl certificate from godaddy that I have installed on the exchange server. and the outlook web app works perfect with it. however, when using the office outlook internally it gives the following cert err

  • BC4J in OC4J Best Practice

    What is the best way to deploy BC4J to OC4J? Option 1: Deploy the BC4J libraries either manually or via the bc4j2oc4j.bat script to OC4J root lib Option 2: Deploy the BC4J runtime libraries with each application deployed under OC4J Currently I use Op

  • How can I unblock a web site?

    my bank says My acc. has a block on it, how do I unblock it?