This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

Search button process error for interactive report (Help with linking search button, numeric item, d

3474044
3474044 Member Posts: 203
edited Jul 13, 2017 2:53PM in APEX Discussions

Hi all,

I am trying to link the search button, numeric field and database together so when I would right down the word and click on search button, it would show the results on IR. I am following this video: https://www.youtube.com/watch?v=Nm5sVJpeZ8c and get error on Pl/SQL section. Can anyone help me to create search item?

Thanks!!!

Please, see the following screenshots for more information about questions and please let me know if i need to give any additional information.

Thanks!

Error message:

1.PNG

My properties and information about IR.

2.PNG

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

3.PNG

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

4.PNG

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

6.PNG

3474044Zapp_Brannigan

Best Answer

«1

Answers

  • Zapp_Brannigan
    Zapp_Brannigan Associate Consultant Member Posts: 105
    edited Jul 12, 2017 4:07PM

    Hi @cs-ftw

    You missed a colon after the assignment operator.

    :P3_ID :=  :P3_ID_COPY;

    Regards,

    Zapp

  • 3474044
    3474044 Member Posts: 203
    edited Jul 12, 2017 4:39PM

    Hi @Zapp_Brannigan ,

    I try to search by the information which is inside of the Network column. Do you know how can I do that? After I corrected the mistake, nothing changed - it doesn't work and gives the error I put at the end. I hope screenshots will clarify the setting I have right now. Should I add dynamic actin to Search button? What should I do next/? Can you help me with it? IF there any clarification i need to do, please let me know.

    Thanks!

    ERR-1002 Unable to find item ID for item "P13_SEARCHBAR_ID" in application "107".

    Unexpected error, unable to find item name at application or page level.

    -------------------------------------------------------------------------------------

    1.PNG

    -------------------------------------------------------------------------------------

    2.PNG

    -------------------------------------------------------------------------------------

    3.PNG

    -------------------------------------------------------------------------------------

    4.PNG

    -------------------------------------------------------------------------------------

    5.PNG

  • Zapp_Brannigan
    Zapp_Brannigan Associate Consultant Member Posts: 105
    edited Jul 13, 2017 2:46AM

    Hi @cs-ftw,

    If you have to search the network column from the search bar, you need to use your item in the Report Source.

    pastedImage_0.png

    Add your page item in Page Items to Submit, below the report query.

    pastedImage_1.png

    No need to add a DA.

    Regards,

  • 3474044
    3474044 Member Posts: 203
    edited Jul 13, 2017 9:08AM

    Hi @Zapp_Brannigan ,

    As you would know already, I am new on APEX.

    Can you please explain where is the report source? And in your screenshot it says about checkbox, but i don't have a checkbox. Did you attached that just to show the ending (from EMP where ename = mv1(:P1_SEARCHBAR,ename); ) ?

    By saying page item, do you mean the text field which for input for the information to search?

    Thanks for your help!

    Screenshots are for to clarify my settings.

    Thanks!

    1.PNG

    ---------------------------------------------------------------------------------------------------------------------------------------------

    2.PNG

    ---------------------------------------------------------------------------------------------------------------------------------------------

    PLEASE, LET ME KNOW IF I NEED MORE INFORMATION TO PROVIDE. THANKS!

  • AdamJaws
    AdamJaws Member Posts: 301 Red Ribbon
    edited Jul 13, 2017 9:48AM

    Zapp just posted the example to show how the searchbar_id can be declared. You will need to change it to what you need in your report.

    Go to the IR page and use that report source, add the last part to it and it should work how needed. It may need some tweaks in order to run properly.

    where network = nvl(:P13_searchbar_id, network);

    Although, I think there is a problem elsewhere from this and that searchbar_id is not being declared properly.

  • Zapp_Brannigan
    Zapp_Brannigan Associate Consultant Member Posts: 105
    edited Jul 13, 2017 10:12AM

    Hi @cs-ftw,

    As you would know already, I am new on APEX.

    No Problem, I am happy to help. I was new 2 years back.

    Cheers.

    So region source is the content of the rewgion, simple as that. you can own a empty region, where you can write your html tags and JS.

    So like that an Interactive Report region is automated with tahle data nicely.

    The SQL Query is source of an IR.

    pastedImage_5.png

    --the IR Query
    select EMPNO,
           ENAME,
           JOB,
           MGR,
           HIREDATE,
           SAL,
           COMM,
           DEPTNO
            network, --consider your column, you want to filter with.
      from EMP
      where upper(network) = nvl(upper(:P2_SEARCH),network));  --read about NVL, it will return the entire result set if null is in your item.
      --network = network. and upper is usually used when you are working with string matching.
      -- don't worry about the button, this work has to be done on submit

    If you want to limit the button, you can go to button condition and do the following,

    pastedImage_14.png

    So, it only fires when request is submit., request value has to be similar as buttons name.

    Regards,

    Zapp

  • 3474044
    3474044 Member Posts: 203
    edited Jul 13, 2017 10:35AM

    Hi @AdamJaws ,

    Thanks for your reply and explaining the answer of Zapp.

    I just want to make sure that I did it correct. can you please see the screenshots for changes? Also, I still get an error. Where can it be? And you said that you think there can be mistake elsewhere. Where do you think it would be?

    (Note: I changed the type of text field to Text Field with autocomplete because I need to use "." between the numbers which Numeric type doesn't let me use)

    Thank you for your time and help!

    ERROR:

    3.PNG

    --------------------------------------------------------------------------------------------------------------------------------

    CHANGES:

    2.PNG1.PNG

    --------------------------------------------------------------------------------------------------------------------------------

    4.PNG

    --------------------------------------------------------------------------------------------------------------------------------

    OTHER SETTINGS:

    5.PNG

    --------------------------------------------------------------------------------------------------------------------------------

    6.PNG

    --------------------------------------------------------------------------------------------------------------------------------

    6.PNG

    --------------------------------------------------------------------------------------------------------------------------------

    THANKS AGAIN!

  • AdamJaws
    AdamJaws Member Posts: 301 Red Ribbon
    edited Jul 13, 2017 10:49AM

    I do not see how you are declaring from p13_searchbar to p13_searchbar_id. That is what I think would be causing the problem. It just seems you have 2 items for 1 action.

    Zapp knows what is going on better than I do with this so maybe he can see something I do not.

    P.S. @Zapp_Brannigan thank you for the upper hint I had totally forgotten about that.

    3474044Zapp_Brannigan
  • 3474044
    3474044 Member Posts: 203
    edited Jul 13, 2017 10:52AM

    Thanks for your reply. I think that's correct that i put two items for one action. Thank you for your time and trying to help!

    @Zapp_Brannigan ,  can you help me to make it work, please? Also, please let me know if i need to give you any additional infromation.

    Thanks!!

  • Zapp_Brannigan
    Zapp_Brannigan Associate Consultant Member Posts: 105
    edited Jul 13, 2017 12:14PM

    Hi @cs-ftw

    Just use : P13_SEARCHBAR inside nvl function, in the SQL query (region source) and remove the computation or process you have to copy value of searchbar into searchbar ID.

    I am out, would not be able to make an example.

    Good Luck,

    Zapp

This discussion has been closed.