Redirect to 3 diffrent pages based on value in the Auto complete field.

Hi Friends,
I am using an "Auto complete field" in a page for searching(Apex version 4.0). But i need to get values from 3 tables and when clicking on the value redirect to any of the 3 pages based on the value.
For example i am having 3 tables. 1.Customers 2.Sites 3.Employees. When i enter 'c' in the search field i need to get values from 3 tables to be listed in that "auto complete" field. i.e, if i am having customer with name 'cusotmer1', 'customer2' and site with names 'cisc1','cisc2' and employees with name'cid1','cid2' ; when i enter 'c' in the auto complete field all 6 values must be listed in the "auto complete" field and when clicking on 'customer1'/'customer2' need to redirect to page 'customer'. When clicking on 'cisc1'/'cisc2' redirect to "site" when clicking on 'cid1'/'cid2' redirect to employees page. Is there any way to achieve this. Please help.
Regards,
Nav

Hi Nav,
OK - on my page 1, I have a "Text Field with autocomplete" item called P1_SELECTION. The List of Values definition setting for this is:
WITH D AS (SELECT ENAME || ' (Employee)' X
FROM EMP
UNION ALL
SELECT DNAME || ' (Department)' X
FROM DEPT)
SELECT X
FROM D
ORDER BY 1This adds the appropriate suffix to each item to show where the data is from - you can change this if you want as this becomes part of the searchable text.
On page 1, I have a normal SUBMIT button.
Then I have two branches:
1 - settings are:
Branch Type: Branch to Page or URL
Branch Point: On Submit: After Processing (After Computation, Validation, and Processing)
Target Type: Page in this Application
Page: 2 (the employee edit page)
Clear Cache: 2
Set these items: P2_ENAME
With these values: &P1_SELECTION.
Condition Type: Exists (SQL query returns at least one row)
Expression 1:
SELECT 1
FROM DUAL
WHERE :P1_SELECTION LIKE '%(Employee)'When Button Pressed: SUBMIT
2 - settings are:
Branch Type: Branch to Page or URL
Branch Point: On Submit: After Processing (After Computation, Validation, and Processing)
Target Type: Page in this Application
Page: 3 (the department edit page)
Clear Cache: 3
Set these items: P3_DNAME
With these values: &P1_SELECTION.
Condition Type: Exists (SQL query returns at least one row)
Expression 1:
SELECT 1
FROM DUAL
WHERE :P1_SELECTION LIKE '%(Department)'When Button Pressed: SUBMIT
On page 2 (the employee edit form), I have Computation with the following settings:
Item Name: P2_EMPNO
Type: SQL Query (return single value)
Computation Point: Before Header
Computation:
SELECT EMPNO
FROM EMP
WHERE ENAME || ' (Employee)' = :P2_ENAME Condition Type: Exists (SQL query returns at least one row)
Expression 1:
SELECT 1
FROM DUAL
WHERE :P2_ENAME LIKE '%(Employee)'On page 3 (the department edit form), I have Computation with the following settings:
Item Name: P2_DEPTNO
Type: SQL Query (return single value)
Computation Point: Before Header
Computation:
SELECT DEPTNO
FROM DEPT
WHERE DNAME || ' (Department)' = :P3_DNAMECondition Type: Exists (SQL query returns at least one row)
Expression 1:
SELECT 1
FROM DUAL
WHERE :P3_DNAME LIKE '%(Department)'The idea is that we append some fixed text to the end of the names in the autocomplete list. When the user clicks submit after selecting a name, one of the branches will be triggered depending on which fixed text is there. The branch sets the ENAME or DNAME value on the edit page and the computation on that page retrieves the appropriate EMPNO or DEPTNO value to put into the primary key page item (the main "Fetch Row..." process will then use that to get the real data for the record).
Note that this assumes that ENAME and DNAME are unique on their tables - otherwise, the computations will not be able to find a single record and an error would be generated.
Andy

Similar Messages

  • Redirecting to different pages based on value from table linked from report

    Hi,
    I wanted to navigate to different pages from a report link based on a value from the table on which the report is built. I was able to link to particular page without any problem.
    But, I wanted to link to different pages based on value in the table. Please let me know how can I do this?
    Thanks,

    kaminey wrote:
    Hi,
    I wanted to navigate to different pages from a report link based on a value from the table on which the report is built. I was able to link to particular page without any problem.
    But, I wanted to link to different pages based on value in the table. Please let me know how can I do this?APEX version?
    Is this a standard or interactive report?
    How does the value from the table determine the target page used in the link? Is it a page number? Or the result of some computation or process?
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.

  • How do I get a new value for the service name field and update it in Connection Properties?

    I am running Windows Vista. I just upgraded to Firefox 4. When I try to log on to the internet, it tells me the proxy server is refusing connections. A diagnostic reported Error 815 and said the remote server is not responding because there is an invalid value for the "Service Name" field. It said to get a new value and update it in Connection Properties. How do I do this?

    When you create a new film script, the first page you see is a title page.
    The page after this title page is the one where you generally type in your scenes.
    It looks like you are facing some issue and not able to delete any text.
    Can you please send me this script so that I can have a better look at your issue?
    You can save this script to disk by using option 'File -> Save to disk'. This will create a '.stdoc' file on your system.
    Just mail this '.stdoc' file to me at 'roverma <at> adobe <dot> com'
    Thanks

  • How do I change the value of the Order By field in an MP3 file?

    good day Guys,
    I'm new here in the forum and I have a question that is "breaking" the order of my songs and my head too ...
    How do I change the value of the Order By field in an MP3 file?
    for example, in the photo below, the song "The Bad Touch" is coming BEFORE the song "A Little Respect", this happens because of the Name field to Order ...
    My "problem" is in the photo below, the "tab" Order, iTunes will not let me erase what is written in the "Sort As" ...
    I've been "collecting" several songs over SEVERAL years
    I'm currently with more than 1,500 songs on HD and several backups on DVDs and external hard drives and I think, download it again, will be a "little" laborious and boring
    I DON'T WANT to be filling the tags of songs (name, singer, CD, year, etc.)
    I have used the program Mp3tag to remove the music tags
    I've tried to download the song again and go through Mp3tag program as if it were a new song
    I've changed the music access permissions, folder and even entire hard drive (my Windows has only one user)
    I've tried to catch the song again, from a previous backup
    I've tried to create a copy of the file at iTunes own
    I've tried to create a new music file in a music recording program
    NOTHING of what I did above resolved
    -> I'm using Windows 7 64-bit Ultimate
    -> I'm using iTunes 12.1.1.4 for 64-bit Windows
    -> My iPad is the third generation (a little old, I know) with Wi-Fi and 3G, but it has served me VERY WELL
    -> The iPad is updated with iOS 8.1.3 and is not unlocked
    I'm sorry for the GIANT post, but well, I think I could explain as much as possible and for my English, too bad, by the way, I'm from Brazil and I'm using Google translator
    Hugs and await answers,
    Paulo Ricardo

    hello turingtest2,
    my language is Brazilian Portuguese (there are some little differences between Brazilian Portuguese and the Portuguese of Portugal, but nothing that interferes with the script)
    at this time, I'm managing songs manually, I don't know if this will interfere with the execution of a script or command
    as I picked up this iPad recently, I still don't understand how to set up the iTunes Music Library and the person who gave me, told me it was easier to put the songs manually
    as you said, in my iTunes, 95% of the songs are with ALL the blank fields, including the Name to Sort field, only songs that begin with a/an/the standing with the Name to Sort field filled with name of the song, without the a/the
    I do not know what to do...
    I want to learn to ride the iTunes Music Library, that my work is less
    you know any site that teaches create/manage my iTunes Music Library?
    this site/forum may be in English, no problem
    thanks for all your help and the help of others who responded to my request

  • Displaying different sheets at run time based on value of the parameter

    Hi,
    I've a query regarding displaying two different sheets at run time in Oracle discoverer based on the value of the parameter that i give.
    I've a parameter Summary_flag.
    If the value of the parameter is 'Y',then it should display a sheet,say for example it should display Sheet1.
    If the value is 'N',then it should display another sheet, say for example it should display Sheet2.
    Is there any way in which i can accomplish this?
    I went through the Format and Tools menus but couldnt find anything regarding this aspect.
    Can you help me out?
    Thanks,

    Having a Disco parameter dictate which worksheet is displayed is not an option that is available. There are a few workarounds, though:
    1. Have a portlet (or some other web interface) accept your parameters, and then call the appropriate worksheet.
    2. Have 2 worksheets, and have it devolve into a training issue (for a summary run this, for all the details run this).
    3. Create calculations that will show or hide column data depending on the parameter selected - the columns will still be there, and you can fill them in with blanks, or a message like "N/A for Summary".
    4. Create a report that will allow the users to drill between the summary and detail data - I'm not sure whether you could use a parameter to then say whether the report should open up summarized or expanded.

  • Can a subreport select records based on values in the main report record?

    Post Author: calvin
    CA Forum: General
    Perhaps my understanding of a subreport is incorrect as this is the first time I've used one, but it seems to me that the subreport should be able to use the values from the main report record in its (the subreport's) operations-but my subreport doesn't seem to be working that way.In my main report, I select a set of records from a 'request' table. I have a subreport in the detail section so the subreport is processed for each of the request records. That works, but I'm simply getting the same data reported multiple times. It's as if the subreport only uses the last request record rather than the current one. Stating it this way I can see that the problem might be evaluation time-it's processing the request records first, then processing the subreport, and only then printing everything. If this is correct then putting WhilePrintingRecords on the subreport should work-but the only way I know of to do that is in a formula. Can I call the subreport from a formula? Or am I totally off-track?Thanks.

    Post Author: foghat
    CA Forum: General
    Have you established a link(s) between your main report and subreport?When viewing the main report, click edit --> subreport links and link the 2 based on whatever values from the main report you want.

  • HELP: WHERE Clause based on value of the column

    I am selecting from a table as follows and want to have a where condition that is dependent of the value of the column, type of the current row.
    CREATE TABLE tbl (INT id, VARCHAR type, VARCHAR comment)
    I have 3 different values for the type column, EMPLOYEE, CUSTOMER, SUPPLIER. What I want is to have a where clause in my select that is based on the value of type.
    I tried the following but was not successful..
    SELECT * from tbl
    CASE
    WHEN type = 'EMPLOYEE' THEN
    WHERE comment LIKE '%employee%'
    WHEN type = 'CUSTOMER' THEN
    WHERE comment LIKE '%customer%'
    WHEN type = 'SUPPLIER' THEN
    WHERE comment LIKE '%supplier%'
    END
    I am not proficient with stored procedures so if you could please tell me how to do it with straight query, I would greatly appreciated it..
    Thank you,

    Or maybe this:
    SELECT *
      FROM tbl
    WHERE "COMMENT" LIKE
              CASE TYPE
                 WHEN 'EMPLOYEE'
                    THEN '%employee%'
                 WHEN 'CUSTOMER'
                    THEN '%customer%'
                 WHEN 'SUPPLIER'
                    THEN '%supplier%'
              END

  • How to get the values for the Authorization Object Fields....

    Hi Everyone,
    I'm pretty new to the SAP Security and have been working on the Basis sides...I created a new role in PFCG and added a few transactions (ME13) and clicked on the Authorizations tab. In there, the authorization tree is in yellow and red. After providing the Org Values, only the yellow lights remain (apart from the green one ofcourse). Now how do we get the values for the different auth obj fields that are in yellow... say for example
    Conditions                                                   COND
    Maintain Condition: Auth. for Use/Appl./Cond.Type/Table      V_KOND_VEA
    Activity                       03                                                                        ACTVT
    Application                                                                                KAPPL
    Condition table                                                                                KOTABNR
    Condition Type                                                                                KSCHL
    Usage of the condition table                                                                 KVEWE
    Here the values for V_KOND_VEA fields e.g. KAPPL, KOTABNR etc are missing.
    My question is how do we get these values in regard to the requirement provided by the client...is it the functional guys who provide these values or else how is a security person supposed to know it...
    All the help in this regard is sincerely appreciated along with the awarding of points...

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • How to set a default value in the "Our reference"-field in purchse orders?

    Hi!
    When creating a purchase order the "Our reference"-field in the Communication-tab is empty. Is it possible to configure this so that the field is filled by default with the name of the person who is creating the PO?

    Hi,
    There is a button named Personal Settings on ME21N screen. Click on that button --> Click on second tab of Default Values --> Click on More fields --> Select Our reference and maintain the default value. This will always come up at the time of creation of PO.
    Hope this serves the purpose.
    Thanks...
    Edited by: vilas amrutkar on Feb 17, 2009 5:17 AM

  • "Modified By" Field Value is same "Created By" field value after the workflow completion.Sp 2010 workflows

    Hi All,
    I have a work flow A attached to List List1
    I have Added an item(now created by and modified by are same)
    Next Person B modified
    Ideally created by value and modified by value should be different, but they are same after the workflow completion
    This is very strange as i am not modifying  modified by field any where
           Please let me know any one has faced similar problem
    Thanks
    Ravi
    Ravi

    The workflow will run as the person who initiated it. As such if the workflow starts when an item is created then it'll be running as the user who created the item.
    When the workflow changes anything the 'modified by' field will be updated to show the identity the workflow is running under. I think that explains your behaviour?
    To change it you could use an impersonation step but that would simply replace one name with another. I don't think you've got access to the 'SystemUpdate()' method in workflows which would allow you to avoid updating the modfiied by and modified date fields.

  • Setting value in the detail level field using hdr level lov

    i try to set value in the detail table using hdr LOV , at that time some fields value are set and some are not set. i don't understand why this happens, please give me the solution

    huh?
    You provide nowhere near enough information for us to even understand what you want to do, let alone to answer.
    John

  • State machine custom task workflow how to pass one task field value to the next task field

    i am using ItemMetadata.xml to pass value from list to custom task first value its passing the but second value is showing as null
    plus how to pass one custom task value to the next custom task
    i.e one supervisor approver comments submitted field i want to see on department manager approval custom task which is the next approver from supervisor
    ows_firstfield=""
    ows_SecondField=""
    the above ows fields are from list
    in this i am unable to retrive the second value in the task form this is my first query?
    second query is that how can we pass one task field value to next approver task field value?
    any idea
    MCTS,ITIL

    What type of workflow is this?  IS this Visual Studio or SharePOint designer or third party (K2, Nintex, etc...)?  YOu should be able to get ahold of the task that was edited via the correlation token, and then grab any value you want from that
    task (wether it be a custom field or a standard worfklow task field). 
    It would help to know what you are using to build the workflow.
    Thanks!

  • Script Logic based on %value% of the Account

    Hi All
    Hope everyone is doing great. This blog has been really helpful.
    Version: BPC NW - 10, sp12
    I have a situation where I am using an account as FLAG01 and based upon the flag value input by the user, I would like the calculation to be executed.
    I have written the basic algorithm which I am looking forward to resolve:
    When FLAG01 = 0
         Do Nothing
    When FLAG01 = 1
           [ACCOUNT].[B] = [ACCOUNT].[A] * (-1)          and goes into ENTITY = "US_ELIM"
    When FLAG01 = 2
           [ACCOUNT].[B] = [ACCOUNT].[A] * (-1)          and goes into ENTITY = "NA_ELIM"
    I have written the script logic, but guess missing the syntax somewhere.
    eg:
    *WHEN "FLAG01"
    *REC(EXPRESSION = %VALUE% = 1 ? ((-1)*([ACCOUNT].[A]), 0 , ACCOUNT = "B", P_ENTITY = "US_ELIM")
    *REC(EXPRESSION = %VALUE% = 2 ? ((-1)*([ACCOUNT].[A]), 0 , ACCOUNT = "B", P_ENTITY = "NA_ELIM")
    *ENDWHEN
    Any insights are appreciated.
    Thanks
    AJ

    Worked like a charm, just had to make minor tweaks based upon details to test it and it worked.
    *WHEN ACCOUNT
    *IS EL05
    *REC(EXPRESSION = ([ACCOUNT].[EL05])==1? (-1)*([ACCOUNT].[FN-COS.1.4.1]):0, ACCOUNT = "FN-REV.1.1.3.5", P_ENTITY = "A")
    *REC(EXPRESSION = ([ACCOUNT].[EL05])==2? (-1)*([ACCOUNT].[FN-COS.1.4.1]):0, ACCOUNT = "FN-REV.1.1.3.5", P_ENTITY = "B")
    *ENDWHEN
    Really glad how the results came out in 3-4 hit and trials.
    Thanks Vadim, appreciate your help on this.
    Thanks to all who helped.
    Regards
    AJ

  • Submit page and pass value at the same time

    Hi All,
    I have a tabular form on EMP table. The SQL query for the form is:
    SELECT empno, ename, sal
    FROM emp
    WHERE deptno = :P0_DEPTNO
    On the form, I have three buttons labelled as dept10, dept20 and dept30. I want to achieve the following when I press a button:
    1. Submit the page.
    2. Value of :P0_DEPTNO is set according to the button pressed.
    I am able to achieve only one of the above at a time. How can I achieve both at the same time.
    I am using Oracle 10g with Apex 4.0.
    Thanks,
    Zahid

    Actually, it would be cleaner to create a single post submit PL/SQL process as follows:
    BEGIN
    :P0_DEPTNO := CASE :REQUEST
        WHEN 'dept10' THEN value_for_dept10 button
        WHEN 'dept20' THEN value_for_dept20 button
        WHEN 'dept30' THEN value_for_dept30 button
        END CASE;
    END;Or if you want to set P0_DEPTNO to the name of the button, then just
    :P0_DEPTNO  :=  :REQUEST;

  • Bex report to report interface dynamically based on Value in the query

    Hi,
    Is it possible to change the destination of the report to report interface dynamically based on the data of the bex query?
    For example my query has the below data
    Plant | KPI | Quantity
    P1 | A | 20.00
    P2 | B | 25.00
    When the user selects KPI A I want to navigate to Query 1, and when KPI B is selected to Query 2. Query 1 and Query 2 have completely different layouts, Instead of create to two destinations is it possible to pick one based on the KPI selected.
    Is this possible in Bex report to report interface or any other way.
    Please suggest
    Thanks in advance.

    Hi
    we have RRI in sap bw. ( TCODE RSBBS.)
    Below article will enlighten you about this topic .
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/607e63d5-b56f-2c10-718f-8e33a08baa89?quicklink=index&overridelayout=true
    hope this helps

Maybe you are looking for