Fire a function from a Choice Box selection

I can't seem to figure out where to place code to create an event when the user selects a choice from a Choice Box:
def theChoice = ChoiceBox {
     items: ['one', 'two''],
function MySelect(){
if(theChoice.selectedIndex == 1){
println("test...");
As far as I can tell, the Choice Box control has no "action" variable (like a Button object) so I'm not sure how to like an event to a selection....
thanks

Lol, you beat me by a few minutes! :-D
To be more precise, Button has no state we can override to detect the action, hence the specific callback. While ChoiceBox has several states (selectedIndex, selectedItem) and can have others in the future (eg. in an editable choice box).

Similar Messages

  • Show text box from one combo box selection

    Total newb here and need help.  I tried searching for a javascript to copy/paste, but without any luck.  I am using Acrobat Pro 9.2.0.  If you could help me out with the javascript or with directions on how to make the following be accomplished, I would be greatly appreciative.
    I am creating a fillable PDF and currently have a combo box that is labeled "Internship Satisfied By" with the options of "TCoB PDP", "MRKTNG 4185", and "Other College".  I would like a hidden text box (where the end user can fill in to explain) to become visible only when the end user selects the "Other College" option, but stay hidden for the other selections.  The hidden text box is labeled "Internship Explained".
    Thanks in advance! Jarrod

    Use this code as the combo box's validation script:
    if (event.value == "Other College") {
    getField("Internship Explained").display = display.visible;
    } else {
    getField("Internship Explained").display = display.hidden;

  • Calling function from procedure

    Hi,
    I have a function validate_address which returns 'Y' or 'N' to say if the address is valid or not.
    I need to call this function from a procedure - saying 'select records where the function returns 'N' (as part of the where clause)'
    Could you help me with how to achieve this, please. Thanks,
    Message was edited by:
    user6773

    Create Or Replace Procedure procedure0001 As
      vAddress          Varchar2(200) := '1 Tech Drive, Silicon Valley, CA 94109';
      vFlag             Varchar2(5);
    Begin
      vFlag := validate_address(vAddress);
      If vFlag = 'N' Then
      End If;
    End;
    or
    Create Or Replace Procedure procedure0001 As
      vAddress          Varchar2(200) := '1 Tech Drive, Silicon Valley, CA 94109';
      vFlag             Varchar2(5);
    Begin
      Select validate_address(vAddress)
        Into vFlag
        From Dual
       Where validate_address(vAddress) = 'N'
    End;
    /

  • Choice Box abnormal behavior

    I have an application with a choice box, which when clicked, the drop down menu pops out in a different location (away from the choice box).
    This application behaves fine with other machines except in one whose config details are below:
    Windows XP service pack 3 (32 bit).
    Anyone else who has faced this issue? Any info would be of great help.

    I have an application with a choice box, which when clicked, the drop down menu pops out in a different location (away from the choice box).
    This application behaves fine with other machines except in one whose config details are below:
    Windows XP service pack 3 (32 bit).
    Anyone else who has faced this issue? Any info would be of great help.

  • Calling SQL Server Function from Oracle Database link

    Hi ,
    i have some data from a old SQL server i would i can access with a database link but i cant call function from my database link.
    i would like to do something like
    @SPAN_PROD = Database link
    _EnerttObtApReelBassSys is a Table function from my SQL server
    SELECT *
    FROM "_EnerttObtApReelBassSys('20120504',4,1)"@SPAN_PROD
    WHERE DateEffectiveDebut <= GetDate()
    AND DateEffectiveFin > GetDate()
    any help ?
    Thnx

    951879 wrote:
    I have a SP in SQL Server which will return a Result Set.
    My requirement is to call that procedure in ORACLE using DB Link and insert that resultset(Data) in the temp table.First you need to setup Oracle to SQL Server connectivity. To do that you can either use HS - heterogeneous connectivity which comes for free or use Oracle Transparent Gateway which is not free. HS uses ODBC, so if your Oracle database in not on windows, you'll have to get ODBC SQL Server driver for Unix/Linux (e.g. from EasySoft). Since SQL Server selecting from table function syntax is different from Oracle's you will have to, if you use HS, to use DBMS_HS_PASSTHROUGH package. I never worked with Oracle Transparent Gateway to SQL Server, so I don't know if and how it supports selecting from SQL Server table function.
    SY.

  • Using functions from Combo Box 'Others:'

    I am trying to use function DENSE_RANK in OWB 9.0.3.33.0. Unfortunately I can not find properly aropriate object form tool box palette. I tried to use JOIN, FILTER, EXPRESSION. Mostly I get error: PL/SQL: ORA-30483: window functions are not properly here.
    I am trying to numerate my records in a set. In SQL I can write clause:
    SELECT ID,DATE_VAL, OPERATE,
    DENSE_RANK() OVER (PARTITION BY ID ORDER BY ID, DAT_VAL DESC) "MY_LEVEL"
    FROM (
    SELECT ID, DATE_FROM DATE_VAL, 'U' "OPERATE"
    FROM SCH.P1
    WHERE DATA_FROM = (SELECT MAX(DATA_FROM)
    FROM SCH.P1)
    UNION                                        
    SELECT ID, DATE_VAL,'I' "OPERATE"
    FROM [email protected] )
    ORDER BY ID,DATE_VAL DESC
    Does anybody can tell me how properly I can to use DENSE_RANK() funcion in OWB and get "MY_LEVEL" pseudo column?
    Thank very much for any advice.
    Peter.
    -Poland-

    Thank You for replay.
    I looked at documentation and I saw that DENSE_RANK is in the list aggregate functions. I mean You want to tell me that version of DENSE_RANK what I use is wrong but my question is about OWB.
    In window "Expression Builder" You can use some of functions. If You add to mapping JOIN object in Expression Builder window You can write join condition. In combo box list called "Others", there is DENSE_RANK in the list. After You select this and paste to window OWB generate code like:
    DENSE_RANK() OVER (
    [PARTITION BY <value expression1> [, ...]]
    ORDER BY <value expression2> [collate clause] ASC
    [NULLS FIRST|NULLS LAST] [, ...] )
    I am confused.
    I still do not know what OWB object I can use to get "My level" pseudo column.
    Regards
    Peter

  • I need a combo box with 4 values to choose from which will populate a text box on the form with text related to each combo box selection

    For example:
    Combo box choices:
    apple
    tomato
    squash
    Pumpkin
    The text box depending on the selection above would state the color:
    Green        (if Apple was chosen from the combo box
    Red           (if Tomato was chosen from the combo box
    Yellow       (if Squash was chosen from the combo box
    Orange      (if Pumpkin was chosen from the combo box
    I am very new at this and have spent hours looking for an answer.  Thank to anyone in advance who can help!

    Place each value as the export value of the options in the combo-box and then use this code as the text field's custom calculation script:
    event.value = this.getField("ComboBox Name").value;

  • Query based on a selection from a combo box

    Hi,
    i have a search.jsp form with some input fields. One of the input fields is a combo box, filled with information from a database. Now I want to query the database with the option selected in the combo.
    This is the code of the combo box:     
    <select name="ScopeCh">
    <option selected value "-1">Select ...</option>
    <% while (searchForm2.getScopes() > 0 ) { %>
    <option value="<%=searchForm2.getScope()%>">
    <%=searchForm2.getScope()%>     
    <% } %>
    </select>
    The query doesn't work when I select a value in the combo box.
    Thanks for your help

    request.getParameter(ScopeCh)
    Should return the Value which was selected from Combo Box

  • Calling a function from a select

    Hi, I'd like to know, from a select, how can I call a function which has in input more than one values (for example all the cities).
    For example from this select I retrieve:
    SELECT STORE.CITY ,LENGTH(STORE.CITY) FROM VIDEO5.STORE STORE
    CITY                           LENGTH(STORE.CITY)
    New York                                        8
    Atlanta                                         7
    Los Angeles                                    11
    San Francisco                                  13
    Pittsburgh                                     10
    New Orleans                                    11
    Seattle                                         7
    Dallas                                          6
    Cincinnati                                     10
    Minneapolis                                    11
    Louisville                                     10
    CITY                           LENGTH(STORE.CITY)
    Phoenix                                         7
    Denver                                          6
    St. Louis                                       9
    Washington                                     10
    Miami                                           5
    Boston                                          6
    Nashville                                       9
    Chicago                                         7
    Philadelphia                                   12
    20 rows selected. Now, if I want to know also the Store Name, for each city, I need to call a function (STATISTIC_REPORT_2) which retrieves for each city the Store Name,.....but I don't know how to pass the "city parameter" inside the function.
    So....in this way
    SELECT LENGTH(STORE.CITY), STORE.CITY, test.STATISTIC_REPORT_2(STORE.CITY)
    FROM VIDEO5.STORE STORE
    I have the following error: ORA-06553: PLS-306: wrong number or types of arguments in call to 'STATISTIC_REPORT_2'
    Before I define a type as:
    create type Tot_Tks_Created_type is table of varchar2(200);
    and the function is
    FUNCTION STATISTIC_REPORT_2 (p_ypiresia Tot_Tks_Created_type)
    return Tot_Tks_Created_type
    IS
    Tot_Tks_Created Tot_Tks_Created_type; VARCHAR2(200); Tot_Tks_Created_type;
    begin
    select store_name bulk collect into Tot_Tks_Created from store;
    return Tot_Tks_Created;
    end;
    Anyone knows the correct syntax or where I make a mistake ?
    Thanks in advance
    Alex

    There's nothing technically wrong with having more than one store per city especially when you are returning a table type as originally specified by the OP:
    drop table stores
    drop table stores succeeded.
    create table stores as (select 1 id, 'Seattle' City, '5th Ave Deli' Store_name from dual
      union all select 2, 'Seattle', '13th St Gas-n-Go' from dual
      union all select 3, 'Seattle', 'Convention Center Lemon Juicer' from dual
      union all select 4, 'Portland', 'Bagle Bistro' from dual
      union all select 5, 'Portland', 'Lime Time' from dual
      union all select 6, 'Tacoma', 'Taco Hut' from dual)
    create table succeeded.
    create or replace type varchar200_tt is table of varchar2(200);
    type varchar200_tt Compiled.
    create or replace function city_stores(city_list varchar200_tt) return varchar200_tt as
      store_list varchar200_tt;
    begin
      select s.store_name bulk collect into store_list
      from stores s
      where city in (select column_value from table(city_list));
      return store_list;
    end;
    function city_stores(city_list Compiled.
    select city, city_stores(varchar200_tt(city))
    from (select distinct city from stores)
    CITY     CITY_STORES(VARCHAR200_TT(CITY))                                      
    Portland VARCHAR(Lime Time,Bagle Bistro)                                       
    Seattle  VARCHAR(Convention Center Lemon Juicer,13th St Gas-n-Go,5th Ave Deli) 
    Tacoma   VARCHAR(Taco Hut)                                                     
    3 rows selected

  • Trouble migrating Crystal Reports Custom Functions from BOXI R2 to BOXI 3.1

    I can't seem to migrate the custom functions from the custom function repository in my R2 environment to the 3.1 with FP 1.3 environment.
    When I migrate Crystal Reports using the Import Wizard, they all come over and they retain their custom functions, however, they don't bring over or create a new custom function repository. 
    When I do run the import wizard I have selected the repository radio button, but it does not have any affect .
    How can I migrate all of these custom functions without having to manually open up reports and placing them back into the repository on the new server?
    Thanks,
    Randy

    Hi,
    so if they are published to Rel.2 this looks different.
    Just to clarify it a bit more...these Files are no Datasources for Reports and Universes and your Users dont consume them via InfoView?!
    Whats the purpose for these Files? If they have none, you can de- select them in the UMT and dont migrate them (or better said move them cause you wont actually migrate .csv files). But if nobody touches them, you can move them with the UMT during daily business...how long it will take i cant estimate it. But 65GB for .CSV files is a huge amount.
    But you are correct, to move them from Rel.2 to BI4 you have to use the UMT.
    If you have the ressources and time i would recommend the following (Thats what i usually do with my customers):
    1. Setup a Machine (could be a VM) with the same OS and BOE Version (included SPs and FPs) as your production Rel.2
    2. Schedule a half day or day Downtime to copy the content 1:1 from the production Rel.2 to the VM Rel.2 with the IW or CMS DB Copy. Or do this after Business Hours.
    - With this Size of your FileStore i would recommend the CMS DB copy way.
    - Now you have a 1:1 Testing Environment of your Production Environment
    3. Use the UMT to migrate from your VM Rel.2 to your BI4 installation
    - Here you can see how long it takes
    - You can check if the UMT is capable for this 65GB transfer
    - Can sort out other possible issues
    - Do some other Testing
    After you did that you have a perfect estimation on how long the Migration will take and what for issues you are facing. With this information you can decide if you need a downtime or can do it after Business Hours f.e.
    Regards
    -Seb.

  • Select all functionality in a check box

    Hi all
    I am using forms 6i
    I have a tabular block with a check box
    i want to have the functionality wherein the user can select all the records of the form by a single click or any other
    way
    basically if the user wants to select all the records he does not have to click all the records individually same for deselect
    Please let me know if we can do this
    thanks

    Hai,
    create a button to select all, and write this code in the WHEN-BUTTON-PRESSED trigger.
    DECLARE
         Num_Total_Records NUMBER;
         Num_Loop_I                     NUMBER;
    BEGIN
         GO_BLOCK('<block_name>');
         LAST_RECORD;
         Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
         FIRST_RECORD;
         FOR Num_Loop_I IN 1..Num_Total_Records LOOP
              :<block_name>.<check_name> := 1;
              NEXT_RECORD;
         END LOOP;
    END;
    Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • How to change the selection background color of the selected item in the popup menu of the choice box ?

    How to change the selection background color of the selected item in the popup menu of the choice box ?
    By defaut, the selection background color likes "blue", but if I want it to be "yellow" for example, how should I do ?
    Thanks

    The id is applied by (I think) the skin class of the ChoiceBox. You don't need to define it.
    You have to apply the css in an external style sheet. You can apply the external style sheet to any parent of your choice box, or to the scene (the most usual way to do it).
    Example:
    import java.util.ArrayList;
    import java.util.List;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class ChoiceBoxTest extends Application {
      @Override
      public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("Example 2");
        final ChoiceBox<String> choiceBox = new ChoiceBox<>();
        List<String> tempResult = new ArrayList<String>();
        for (int i = 0; i < 10; i++) {
          tempResult.add("Item " + i);
        choiceBox.getItems().setAll(tempResult);
        VBox root = new VBox();
        root.getChildren().add(choiceBox);
        final Scene scene = new Scene(root, 300, 250);
        scene.getStylesheets().add("choiceBox.css");
        primaryStage.setScene(scene);
        primaryStage.show();   
      public static void main(String[] args) {
        launch(args);
    choiceBox.css:
    @CHARSET "UTF-8";
    #choice-box-menu-item:focused  {
    -fx-background-color: yellow ;
    #choice-box-menu-item .label {
    -fx-text-fill: black ;
    Message was edited by: James_D

  • After selecting the value from the list box, want to disable checkbox

    hi guru,
    After selecting the value from the list box, want to disable checkbox and custom control textbox(container) in module pool.
    so please help me on this.
    thanx,
    man

    in PBO,
    loop at screen.
      if screen-name = your textbox's name.
        screen-input = 0.
        modify screen.
      endif.
    endloop.

  • How to pass rowtype argument to a function from select statement?

    Hi all!
    I have function that takes mytable%rowtype as in parameter. can I pass entire row of mytable to the function from select statement? kind of
    select myfunction(mytable.*) from mytable where ....
    Thanks in advance

    The function can be used in a SQL statement only if it accepts SQL types and returns SQL type. %ROWTYPE being PL/SQL construct and not a SQL datatype, can not be used in this context.
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10743/datatype.htm#i2093

  • What is the webconference tool of choice for demos from a linux box?

    Since conference.oracle.com and strtc only work on IE, what are folks doing when they want to do a webconference from a linux box? Are people installing IE (I see it is possible but sounds a bit hacky), or is there another oracle conference tool or are people connecting from a PC to the linux box and running conference from there (is that possible?).
    Thanks for any idea you could give me.

    http://www.oracle.com/technetwork/middleware/beehive/downloads/index.html
    http://forums.oracle.com/forums/category.jspa?categoryID=180

Maybe you are looking for

  • How do I partition an external HD?

    Ok, I know this is probably an easy question but I have never done it before and was hoping to get some guidance. I currently have a PowerBook G4 with an 80 GB HD, 1 GB RAM, SuperDrive, etc. I am moving abroad and plan on selling my PowerBook but wou

  • My media center M8000y no longer completes boot sequence...I turn on the desktop and sometimes the b

    HP Media Center M800y, System # GG755AV#ABA, Windows Vista Ultimate, Desktop will not complete boot sequence as the Blue & white HP screen which doesn't always appear, will give options to either a).Press F10 to enter setup or, b). to press f11 to st

  • Finder window on Mac won't scroll horizontally in Muse

    I noticed that anytime I open a finder window through Muse (i.e. replace image), the finder window's scroll bar only scrolls so far.   I have to resize the window to view other columns.   This appears to be a new bug, as it was working normally in th

  • Publishing Problems -- Errors Galore

    Here we go again... I am yet again having repeated and contiunuous error messages when I publish any changes. I have spent a couple of hours of my life this past week on hold with calls to Apple (and many, many more at the keyboard) and finally was p

  • N-step BADI approval SRM workflow

    Hi, I am implementing N-step approval badi for SC approval using header level workflow (WS14000133) in SRM 5.0. My requirement is to determine the financial analysts responsible for each line item and then the mangement approvers based on their appro