Assign to item a list of value according to the contents of other fields...

Let me explain, I have two items in my page, the first is not required, if it is null the second field is a value list based on selection A (select from A. .. A. .. where . A..) but if the field is not null then the list of values of the second field is based on the selection B (Select B from B where B. ..).
I create a dynamic action on the event "change" of my first field,  on the "true action" I tried this:
declare
  vva_ternum Varchar2 (3): = null;
Begin
  APEX_ITEM.SELECT_LIST_FROM_LOV (2, : P26_TERNUM, 'LOV_RSPRODUIT_TERRITOIRE');
End;
But it does not work!!
do you have a suggestion?

Him this is my LOV :
IF Trim(:P26_TERNUM) IS NOT NULL THEN
RETURN
   'SELECT Initcap(Trim(P.PRODSC)) || '' -  ''|| Trim(P.PRONUM) AS dv , ' ||
   'T.PRONUM '  ||
   'FROM RSETABL_PRODUIT T ' ||
   'INNER JOIN RSPRODUIT P ON T.PRONUM = P.PRONUM ' ||
   'WHERE T.TERNUM = :P26_TERNUM ' ||
   'ORDER BY 1'; 
ELSE
  RETURN
   'SELECT Initcap(Trim(PRODSC)) || '' - '' || Trim(PRONUM) AS dv , ' ||
   'PRONUM '  ||
   'FROM RSPRODUIT' ;
END IF;
This is my properties of my second field
List of Values
Named LOV
   TEST_PRODUIT
Display Extra Values
  No
Display Null Value
  No
Cascading LOV Parent Item(s)
P26_TERNUM
Page Items to Submit
Optimize Refresh
  Yes
Editor Setting: Textarea - HTML/XML - Javascript - PL/SQL 
List of values definition
IF Trim(:P26_TERNUM) IS NOT NULL THEN
RETURN
   'SELECT Initcap(Trim(P.PRODSC)) || '' - ''|| Trim(P.PRONUM) AS dv , ' ||
   'T.PRONUM '  ||
   'FROM RSETABL_PRODUIT T ' ||
   'INNER JOIN RSPRODUIT P ON T.PRONUM = P.PRONUM ' ||
   'WHERE T.TERNUM = :P26_TERNUM ' ||
   'ORDER BY 1';
ELSE
  RETURN
   'SELECT Initcap(Trim(PRODSC)) || '' - '' || Trim(PRONUM) AS dv , ' ||
   'PRONUM '  ||
   'FROM RSPRODUIT' ;
END IF;
Create or edit static List of ValuesCreate Dynamic List of Values

Similar Messages

  • [ADF BC] Showing a list of values based on the contents of another list

    I have tried to make a simplified example to illustrate what I want to do. Here is a picture of my example schema:
    Example Schema Image
    There are three entity tables: Employee, Department and Location.
    There are also two intersection tabels: Employee_Location and Department_Location.
    My ADF BC model layer is based on this schema.
    What I am trying to do is have a creation process for an employee where you first fill in the employee details (forname and surname), then you assign the employee to a department, then - based on the locations assigned to the department - assign one or more locations to the employee.
    Imagine that the employee is a door-to-door salesman and that each department in is company has several areas of a town that they cover (locations). Each employee will cover a subset of the locations that the department covers.
    The first two steps are easy - the details page can be created using a form on the employee view and the department assignment can be done with a list of values drop down on the departments view.
    The third step is a little more complex. You can use a shuttle to assign one or more locations to the employee, but you shouldn't just show a list of all locations, since some of these will not be covered by the department and therefore not be available to the employee. What I want is only the locations associated with the employee's department to appear in the list.
    So my question is how do I model this using ADF Business Components?
    Also, if an employee is allowed to be assigned to more than one department (adding another intersection table between the employee and department tables), how would I model that?

    Hi,
    For your reference variable name should be simply any name i.e resorts_resort.No need to put @ in front when declaring variable and to refer presentation variable you should use the below syntax
    @{Variable_name}{Default_value} where default_value is some default value you want to give.
    Now coming to your problem you can fulfill your requirement by simply checking constrain checkbox.If you choose all values instaed of SQL results constrain checkbox will appear.Approach followed by you should also work but constrain is an easy option.
    Thanks
    Sandeep
    Edited by: Sandeep Saini on 10-Sep-2010 00:59
    Edited by: Sandeep Saini on 10-Sep-2010 00:59

  • Make iframe automatically adjust height according to the contents without using scrollbar?

    Hello, 
    I am developing the site (www.meninasreais.com.br) and have a doubt. I created the base html - menu, header - in Adobe Muse. I'm trying to insert an iframe that automatically adjust the height according to the content of the blog.
    I tried with various codes, the frame is installed on the same domain as the site and none of them worked. What can I be doing wrong? Thank you.
    The code that was inserted below:
    <script language="JavaScript">
    <!--
    function autoResize(id){
        var newheight;
        var newwidth;
        if(document.getElementById){
            newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
            newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
        document.getElementById(id).height= (newheight) + "px";
        document.getElementById(id).width= (newwidth) + "px";
    //-->
    </script>
    <IFRAME SRC="www.meninasreais.com.br" width="600px" height="200px" id="iframe1" marginheight="0" frameborder="0"onLoad="autoResize('iframe1');"></iframe>

    Hi, i've successully done this for my blogging engine.
    I've uses jquery.autoheight.js
    In my page property :
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.js"></script>
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.autoheight.js"></script>
    In my html box :
    <iframe id="myframe" name="myframe" class="autoHeight" width="100%" scrolling="no" marginheight="0" frameborder="0" src="http://www.solutionsip.ca/blog"></iframe>
    This work in Adobe muse. My iframe adjust it self with my blog content.
    Exemple : http://www.solutionsip.ca/blog.html

  • Make iframe Webcenter 11.1.1.5 automatically adjust height according to the content

    Hi All,
    Anyone can help me how to make Iframe (application page template) webcenter portal automatically adjust height according to the content?
    Thanks in advance..

    Hi, i've successully done this for my blogging engine.
    I've uses jquery.autoheight.js
    In my page property :
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.js"></script>
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.autoheight.js"></script>
    In my html box :
    <iframe id="myframe" name="myframe" class="autoHeight" width="100%" scrolling="no" marginheight="0" frameborder="0" src="http://www.solutionsip.ca/blog"></iframe>
    This work in Adobe muse. My iframe adjust it self with my blog content.
    Exemple : http://www.solutionsip.ca/blog.html

  • Assign a SELECT item's list of values - APEX 2.2.0

    Hey, all,
    Is there a way to assign the list of values of a SELECT item programatically, besides the usual query-in-the-LOV? I am reusing a page 0 region and have a SELECT item that can take on a wide range of lists of values. Something like:
    AddOptionToSelectItem('P0_MY_SELECT', 'Yes', 1);
    AddOptionToSelectItem('P0_MY_SELECT', 'No', 0);
    or:
    SetLOV('P0_MY_SELECT', somethingRepresentignAListOfValues);
    If that cannot be done, I'll just put all of the parameters I need to figure out what goes into the select list into page 0 items and either write query the old fashioned way or write a PL/SQL function that takes the parameters in and returns a table.
    Thanks!

    In case this helps, you can specify an item's LOV attribute as a function that returns the LOV query, e.g.,
    return my_lov;
    Scott

  • How to get a list of values used in the WHERE filter of stored procedures and functions in SQL Server

    How can I get a list of values (one or more) used in the WHERE filter of stored procedures and functions in SQL Server?
    How can get a list of values as shown (highlighted) in the sample stored procedure below?
    ALTER PROC [dbo].[sp_LoanInfo_Data_Extract] AS
    SELECT   [LOAN_ACCT].PROD_DT,
                  [LOAN_ACCT].ACCT_NBR, 
                  [LOAN_NOTE2].OFCR_CD, 
                  [LOAN_NOTE1].CURR_PRIN_BAL_AMT, 
                  [LOAN_NOTE2].BR_NBR,
    INTO #Table1
    FROM
                    dbo.[LOAN_NOTE1],
                    dbo.[LOAN_NOTE2],
                    dbo.[LOAN_ACCT]
    WHERE
                    [LOAN_ACCT].PROD_DT = [LOAN_NOTE1].PROD_DT
                    and
                    [LOAN_ACCT].ACCT_NBR = [LOAN_NOTE1].ACCT_NBR
                    and
                    [LOAN_NOTE1].PROD_DT = [LOAN_NOTE2].PROD_DT
                    and
                    [LOAN_NOTE1].MSTR_ACCT_NBR = [LOAN_NOTE2].MSTR_ACCT_NBR
                    and
                    [LOAN_ACCT].PROD_DT = '2015-03-10'
                    and
                    [LOAN_ACCT].ACCT_STAT_CD IN
    ('A','D')
                    and
                    [LOAN_NOTE2].LOAN_STAT_CD IN
    ('J','Z')
    Lenfinkel

    Hi LenFinkel,
    May I know what is purpose of this requirement, as olaf said,you may parse the T-SQL code (or the execution plan), which is not that easy.
    I have noticed that the condition values in your Stored Procedure(SP) are hard coded and among them there is a date values, I believe some day you may have to alter the SP when the date expires. So why not declare 3 parameters of the SP instead hard coding?
    For multiple values paramter you can use a
    table-valued parameter. Then there's no problem getting the values.
    If you could elaborate your purpose, we may help to find better workaround.
    Eric Zhang
    TechNet Community Support

  • Item can not be invoiced according to the billing plan

    Hi.
    I change a sales order in t-code va02 and select the item 10 and click the menu "Goto->Item->Billing plan".The sap pop up a message "Item 000010 can not be invoiced according to the billing plan".And there is no detail help to this message.I don't know why sap pop up such a message and how to resolve this problem.So I need you give me useful reference to resolve it.
    Thank you.
    Regards
    Yoda

    Hi Yoda
    Check your Sales order. The Item category for the Item should be either TAO or WVN for Milestone and Periodic Billing Plan respectively.
    The Billing plan type is proposed from the Item category.

  • Need script to read a list and compare it to the contents of a folder...

    I need a script that will read all of the file names within a tab delimited list and then compare them to the files within a directory (named IMAGES) and delete the files of this IMAGES folder that are not included in the list.
    Thanks in advance.

    It won't work because of what you're comparing.
    Consider if files_list does not contain (image_file as string) then.
    Your script defines files_list as the contents of the specified file like:
    "file1.jpg
    file2.jpg
    file3.png"
    and image_file is a list of files which, when coerced to a string looks like:
    "Cabezon:Users:cochino:Desktop:images:file1.jpgCabezon:Users:cochino:Desktop:ima ges:file2.jpgCabezon:Users:cochino:Desktop:images:file3.png".
    There is no way files_list is going to be in image_file.
    Instead you're going to have to iterate through one or other of the lists and find matches.
    Since the list of files you want to keep is around 1,000 items long, and there are 6,000 files in the directory it would be quicker to iterate through the list of files to keep (a loop of 1000 iterations) than it would be to loop through the files to see which ones to delete (a loop of 6000 iterations).
    Therefore your best bet is something like this (untested):
    tell application "Finder"
    --define the source directory
    set sourceDir to folder "Cabezon:Users:cochino:Desktop:images:"
    -- create a temp dir for the files to keep
    set filesToKeepFolder to (make new folder at (path to temporary items) with properties {name:"TempImageDir"})
    -- get the list of files to keep
    set files_list to paragraphs of (read file "Cabezon:Users:cochino:Desktop:Workbook2.txt")
    -- iterate through them
    repeat with eachFile in files_list
    try
    -- move the file to the temp folder
    move file (eachFile as text) of sourceDir to filesToKeepFolder
    end try
    end repeat
    -- by the time you get here all the matched files
    -- have been moved to the temp dir
    -- so now you can throw away the rest of the files
    delete every file of sourceDir
    -- and copy the files you want back in
    move every file of filesToKeepDir to sourceDir
    -- and clean up
    delete filesToKeepDir
    end tell
    The comments should give you some idea as to what it's doing, but in short it walks through the list of files looking for matching files in the specified directory. If it finds a match it moves that file to a temporary directory. At the end of the 1,000 iterations, what's left in the directory are the files that did not match the file read in at the beginning, so these files can be deleted.
    Finally, to clean up, the files you want are copied back into the images directory and the temporary directory is deleted.

  • How can I show a value according to the position of the mouse arrow ?

    Hi Everyone,
    I am changing the color of the background of some indicators according to temperature measures. Each background is linked to one temperature. I would like to show the value of a temperature when passing the arrow of my mouse over the indicator. I don't want to over charge the Front Diagram with all of the temperatures.
    Is this possible? The temperature could appear in a unique and fixed indicator, or linked to the arrow,...
    Any help would be great,
    Thanks,
    User
    Solved!
    Go to Solution.

    Hi Ravens and Dan,
    Thanks for your answers.
    Ravens, I would rather not use the arrow position because I need to do this overs 100 indicator, and that would be a bit long. Added to that if I need to change the positions of the indicators (whch I will) that would mean to redefine the positions of the indicators....But perhaps your solution is the only possible?
    Dan, I have taken out and simplified the piece of my program. Setting the value of the indicator to transparent except when the mouse is over the indicator could be an example of presentating the values but I still don't know how to this (without having to define the position of each box)
    Thanks again
    User
    Attachments:
    forum 14 02 10.vi ‏9 KB

  • One field value will be populated depending on other field's value

    I have two select-options in my selection screen- a)VBAP-VBELN b)VBAP-MATNR.
    My requirement is that if i enter Sales Doc(VBAP-VBELN) in first combo ,Material Number combo(VBAP-MATNR)will be populated with Material numbers for that corresponding Sales Doc only. Not all Material number.
    Please help.

    Hi,
    check this example...
    REPORT  ZTEST_F4HELP                              .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           exceptions
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                others               = 11.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.
    Cheers,
    SImha.

  • Scale popup according to the content

    Hi,
    I am generating a popup thru actionscipt:
    myTW = mx.managers.PopUpManager.createPopUp(_root,
    mx.containers.Window, false, {closeButton: true, title:
    _root.reqmessage1, _width: 610, _height: 232, _x: 120, _y: 240,
    color:
    16711680,contentPath:radioButtonArray[_loc2].object.bkimage});
    where,
    bkimage represents any img/swf which comes from an xml file.
    Now, i have already specified the width& height in the
    properties. But, when the image is bigger or smaller, i would like
    to have the popup scale itself accordingly. What changes do i make
    to the script? pls help.

    Hi wilhelm,
    You can do the following.
    1) Create your popup as desired in jsf fragment with a dialog box .
    2) Bind the popup with the backing bean.
    3) Now on valueChangeEvent of selectOneChoice you can write a method in the backing bean.
    4) Check the newValue in valueChangeEvent and according to value, call the appropriate popup that you need to show.
    For example , code in jsff+
    *<af:popup id="p2"*
    *binding="#{backingBeanScope.referenceDataBean.startDatePopUp}">*+
    +*<af:dialog id="d2" type="yesNo"*+
    +*title="#{nl_svb_view_referencedataBundle.CONFIRM}"*+
    +*dialogListener="#{backingBeanScope.referenceDataBean.goToConfirmDialogListener}">*+
    +*<af:outputText value="#{nl_svb_view_referencedataBundle.Expansion_service}"*+
    +*id="ot2"/>*+
    +*</af:dialog>*+
    +*</af:popup>*+
    +_Code inside valueChangeEvent_+
    *RichPopup.PopupHints ph = new RichPopup.PopupHints();*
    *startDatePopUp.show(ph);*
    Hope this answers your question.
    Regards,
    Tarun

  • Value put in the maintenace view for field of DOC type gets divided by 100

    Hi all,
    We have a product table ZPROD_T which contains one quantity column (QUANT) of the data type DOC. We have also created a view and a maintenance view for this table.
    The problem is that when we add new values to the table using the maintenance view, the value that we add to the QUANT field gets devided by houndred. E.g. if we put in 4 in the QUANT field (type DOC), the value that we later see in the table is 0,04!
    How do we go about to solve this problem and get the correct value in the table? Should we change the maintenance view somehow or change the data type in the QUANT field from DOC to something else?
    All help is greatly appriciated!
    BR,
    Armin

    Yes, that would be an option, but I was kinda hoping there was another way to solve this problem. Namely, when we would like to have ability to have decimal values in that field, e.g. if we have quantity in sqr meters or meters. Also if we change data type to QUAN than we need to put values in the "Currency/Quantity fields" in the table ZPROD_T, and at the time we are not sure about what unit of measure we are gonna have!
    Is it possible to keep DOC data type and still get the correct values in the table?
    /Armin

  • Limit list of values

    I have a field in a form based on which value i have to filter a list of values. So in the query for the record set i have filtered the query using the where condition like where column_name = :block.item. So that would filter the LOV based on that value in that field. My problem is that that there can be multiple rows for that block and the same item used to filter can have multiple values bcoz of multiple rows. Now how do i pass these different values to the record set and filter the LOV.
    For ex if the value is for city fields i could have 2 different rows with one value for city being NY and second row being CA. NOw i have to dynamically pass these city values to a list of value and filter the LOV.

    Hello,
    It is better to create the record group dynamically at runtime to loop through all detail rows and create one IN clause for all the values.
    What i mean is it can be for example like this...
    DECLARE
      vSqlStr VARCHAR2(4000);
      vInClause VARCHAR2(1000);
    BEGIN
      vSqlStr:='SELECT empno, ename FROM emp WHERE empno IN (';
      FOR LOOP ...
        vInClause:=vInClause||:form_field_name||',';
        NEXT_RECORD;
      END LOOP;
      vInClause:=SUBSTR(vInClause,1,LENGTH(vInclause)-1);
      vSqlStr:=vSqlStr||vInClause||')';
      -- Now create the record group using the above query and assign to that LOV.
      -- See forms help for CREATE_GROUP_FROM_QUERY
      -- And use SET_LOV_PROPERTY to set the created record group for that LOV.
    END;-Ammad

  • Record group/list of values question

    Is it possible to assign one record group/list of values to multiple data items on a canves? If so, how is it done.
    Thanks

    Thanks for the replies..
    What I have is this... I have a db record with 3 currency code fields, three different types of codes, displayed on the canvas. When the user mouse's over to any of the currency code fields, I wanted the lov to pop up and the user pick one of the selections. The lov has 2 columns, country and currency
    Ex: France | Euro
    U.S. | Dol
    I built this as a static record group. If I'm in the second currency code field and pick a value, the first currency code field gets overlayed with the new value.

  • Report Parameter form not showing list of values in Report svr

    I was using reports 6i where I used to have list box in report parameter form. I now converted recompiled my reports in 10g and when I run I am not geting the list of values. I get the values as a list below the field
    ex.
    ITEM :___________
    box,book,pencil,rubber,
    dvd,floppy...
    previously it was coming as a list in the item field
    thanks
    MG

    Hello,
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/howto/params/pmp_creating_list_of_values.htm?tp=true
    If you run the report from a Web browser and the list of values is unrestricted, the HTML Parameter Form will display a text field instead of a combo box, and a list of static values that you can copy and paste into the text field.
    Regards

Maybe you are looking for

  • Lookup in same batch of messages

    hi all, is it possible to do a lookup in same batch of messages? Ex. FTP-XI-R/3 A textfile was transferred in FTP. I need to do a lookup if there are any 2 similar messages (messages containing same value in a certain field).

  • Custom Policy vs. J2EE Security

    Hi there, Java Security architecture gurus, I am currently trying to find the best architecture for the new security framework for our company's application. The system requires instance based security. ACLs are stored in a database. JAAS's authentic

  • Adding a column in infotype(table control)

    i want to add a column in table control of infotype 0591. i need to add age for every nominee. i cant edit standard sap mp prog. so i thouhgt of copying it into zprogram, and now i have to assign it to that standard infotype so that this infotype wil

  • Adding a secure WLAN - WISM and WCS

    I have a setup including a WISM and WCS which currently only runs a guest service using webauth to get online. The service (by request) is not secured over the air. I would like to implement a second SSID with security but before going the whole way

  • Get IP Address For  a user name from Terminal

    hi experts, Can any one help me in finding the IP address for a user id.I want to find the ids for multiple logons. I tried using TERMINAL_ID_GET but it returns the IP only based on the user id.So i am getting only one IP. I tried with CL_GUI_FRONTEN