This discussion is archived
1 2 Previous Next 27 Replies Latest reply: Nov 7, 2013 1:37 PM by Nicolette RSS

Sending many parameters through the column link

newbi_egy Explorer
Currently Being Moderated

db11gxe , apex 4.0 , firefox 24 ,

hi all ,

i have these pages in this schema on apex.oracle.com

elbyaly

eyesmagicx@yahoo.com

decuk9

 

page 3 has a form which has two items (pat_name , and doc_name) and a tabular one which has a column link and a pop-up item (test_no) , i want to send

the number of the test the user chooses from the lov and send the pat_name , and doc_name values as well

to

the corresponding items in page 2 (results) .

 

how to do so ?

  • 1. Re: Sending many parameters through the column link
    peter_raganitsch Oracle ACE Director
    Currently Being Moderated

    look at the definition of the column link, there should be two arguments to define page-item names and values you want to pass to the linked page.

  • 2. Re: Sending many parameters through the column link
    newbi_egy Explorer
    Currently Being Moderated

    sure i did , but i could find nothing but the tabular columns not the form items . so i can not pass the form items , and even the tabular column test_no i can not pass it when i choose the name of the item and it as a value ?

  • 3. Re: Sending many parameters through the column link
    newbi_egy Explorer
    Currently Being Moderated

    to nicolette , if you could wait for me to add some items in the form , and modify somethings , then i will tell you what exactly i want .

  • 4. Re: Sending many parameters through the column link
    newbi_egy Explorer
    Currently Being Moderated

    i changed the things i meant , but there are many problems now :

    2- what i want is :  when the user clicks on the edit link beside a test name , the test name is passed to the corresponding item in the other page

    , and  all items' values except (pat_no,pregnant,diabitic) are passed as well  to the corresponding display only items in page 4.

     

    3- i changed the dynamic action (advanced tab ) to dynamic , and something very wrong happened . please try to add row and test it .

    the application is always (another of patients)

     

     

    thanks a lot

  • 5. Re: Sending many parameters through the column link
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    To refence a page item in a report link use the following syntax for the value &P_ITEMNAME.. Don't forget the dot after the name.

    newbi_egy wrote:

     

    3- i changed the dynamic action (advanced tab ) to dynamic , and something very wrong happened . please try to add row and test it .

    the application is always (another of patients)

    I have corrected the javascript code on that page an on my page in application patients. Also edited the original post in detail tabular form

     

    newbi_egy wrote:

     

    i changed the things i meant , but there are many problems now :

    2- what i want is :  when the user clicks on the edit link beside a test name , the test name is passed to the corresponding item in the other page

    , and  all items' values except (pat_no,pregnant,diabitic) are passed as well  to the corresponding display only items in page 4.

    The way you have it set up now isn't going to work. And it starts with a datamodel that is flawed.

    For instance the RESULT table doesn't have any foreign key's. Neither to the PATIENTS, TESTS or PAT_TESTS tables.

    With out a foreign key to PAT_TESTS or 2 to both PATIENTS and TESTS you would never be able to show the results of a particular test done on a patient.

    And I guess that when you want to show the results of a test you want to only show the results for a patient A and not also for patient B,C and D who also have taken the test.

     

    If you change the PAT_TEST from a help table, to register the many to many relationship between patients and test, to a full entity with relationships to patient, test and result. You would be able to record the result sets to a particular moment the test was taken.

     

    In what context are you doing this? Is this for a job or is it homework for your study? Is there no colleague or mentor that can guide you on the datamodel.

     

    Nicolette

  • 6. Re: Sending many parameters through the column link
    TexasApexDeveloper Guru
    Currently Being Moderated

    Wasn't this issue raised a few different threads ago by this poster?  Since it seems to be a repeating issue, why is it not being heard.. Your Data model is NOT able to support what you are trying to accomplish.. Can you take a step back and work on your data model instead of coming up to get code support for your application?

     

    Not trying to be a hard-arse here, but when numerous people up here suggest that you need to work on your data model to get your application to perform the way you envision it, and you continue to drive forward with a model that is flawed.. It just wastes both your time and ours...

     

    Thank you,

     

    Tony Miller

    LuvMuffin Software

  • 7. Re: Sending many parameters through the column link
    newbi_egy Explorer
    Currently Being Moderated

    > Is this for a job or is it homework for your study? Is there no colleague or mentor that can guide you on the datamodel.

    i am trying to learn apex ,

    i did not relate the results table because i thought that i did not need to .

    but after your words i think now i have to create a primary key for it , but i do not know with which table to relate it ? if you could help me ,

    there are no more tables , this is the last .

     

    with which table should i relate it ? and do i have to add a primary key to it ?

     

    btw : i do not know how are not you the top user of the forum !?

  • 8. Re: Sending many parameters through the column link
    newbi_egy Explorer
    Currently Being Moderated

    hi texas ,

    no one told me anything about my data model except nicolette , and i modified it well ,

    this table which we are talking about is added recently . and i am trying to get help here , and i think i do not bother nicolette (i hope) ,

    but about you , i am very sorry if i am bothering you , i am newbie , so sorry .

  • 9. Re: Sending many parameters through the column link
    TexasApexDeveloper Guru
    Currently Being Moderated

    Re: Data model In other threads you have posted this issue has been talked about.. I did NOT use the term both, I said it wastes all of our time trying to solve an issue that is partially in regards to a data model that is not well thought out.  I am NOT trying to be mean or gruff, but if you design an application based upon a faulty data model, then all you have done is build a bowl of spaghetti and added extra meat sauce to it..

     

    A good data model will HELP build a Good application.. Its still possible to build a bad application on a good model, but it takes a little more effort..

     

    Thank you,

     

    Tony Miller

    LuvMuffin Software

  • 10. Re: Sending many parameters through the column link
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    newbi_egy wrote:

     

    > Is this for a job or is it homework for your study? Is there no colleague or mentor that can guide you on the datamodel.

    i am trying to learn apex ,

    I take that as nobody is guiding you in that learning process.

    As Tony is pointing out you would not be able to learn much about APEX if you don't have a solid database model as it's foundation.

    If the real goal is learning to work with APEX and building a laboratory application is just a means. Then stop working on this application. And start with replicating the demo application or one of the many package applications. Then you have a ready made database model on which to build your application. And a guide on how an application build with apex could function and look like.

    If the real goal is building the laboratory application and learning APEX is a means to build that application. Then start with learning everything you can about building a good datamodel. Do a good analysis of the work flow and processes that the datamodel and the application should facilitate. And only after you have a good understanding of that start building the application.

    i did not relate the results table because i thought that i did not need to .

    but after your words i think now i have to create a primary key for it , but i do not know with which table to relate it ? if you could help me ,

    there are no more tables , this is the last .

     

    with which table should i relate it ? and do i have to add a primary key to it ?

    I have already mentioned which tables, I think, should relate to which. Research the terms entity and relationships in the context of data models and then read the previous post again.

    If the table should have a primary key I personally would say that every table that represents a entity in the datamodel should have a primary key. Now if that primary key should be a natural key or a surrogate key is open for debate.

     

    Part of the learning process is search the world wide web for terms you don't understand. Just as admitting that you made a mistake learn from it and start over.

     

    Nicolette

  • 11. Re: Sending many parameters through the column link
    newbi_egy Explorer
    Currently Being Moderated

    > I take that as nobody is guiding you in that learning process.

    there is now .

    i modified the table to be :

    id  -- pk

    pat_no -- fk to patients(pat_no)

    test_no -- fk to tests(test_no)

    sub_test_name

    result

    unit

    i did not do this on apex.oracle.com yet .

    i think i am right now , and there is no problem with the data model anymore .

    do you still want to help me ?

    and about the demo application , i have built it before .

  • 12. Re: Sending many parameters through the column link
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    Can you explain to me way you chosen this solution?

    Instead of chancing PAT_TESTS by adding a ID as primary key. And maybe even a date for when the test was taken. 

    And have a relationship between PAT_TESTS and RESULTS.

     

    Besides the data model there is also the case that the application you are trying to build doesn't make sense.

    When you have chosen a test that was done on a patient why would you change that to another test?

    Does the person that does the laboratory test need to see and know the patient information when filling in the result. I would think that is a serious privacy situation? And even if they should be able to see that information should they be able to change it?

    Are there really a lot of test done on a patient at the same time. In other words do you really need a tabular form here or have you implemented one because it looks fancier?

     

    With an application it is not just about being able to input the data.

    You also need to think about how often a data needs to be added or changed in a table.

    If all the users should be able to do everything or can you describe tasks that are only done by a particular group.

    So before designing and building an application you need to ask yourself these questions.

     

    For example in the demo application the customer data changes much less then the orders. So the customer data and the order data are accessed trough different tabs.

     

    I hope all these questions don't frustration to much. But it so much more gratifying building an application that you see being used in real live then a bundle of pages. And when you have that basic application working then go looking into more advanced features.

    For instance first build the application only using forms and reports. And when you are satisfied with that add in more advanced stuff. Such as dynamic actions to react directly on user interaction.

    Change a form in to a tabular form where that makes more sense.

    Add in some authorisation.

     

    And take in to account that all these question don't have a good or wrong answer just take the time to think about them.

     

    Nicolette

  • 13. Re: Sending many parameters through the column link
    newbi_egy Explorer
    Currently Being Moderated

    > Instead of chancing PAT_TESTS by adding a ID as primary key. And maybe even a date for when the test was taken.

    i think you mean another table (patients) , and has a date field .

     

    > When you have chosen a test that was done on a patient why would you change that to another test?

    i do not understand this , i do not want to  .

     

    > Does the person that does the laboratory test need to see and know the patient information ?

    yes . because he is the doctor .

     

    regardless the rest of your real interesting words , i think i am doing well , the application is suitable for the shape of the business i need , and according to my country's

    circumstances , it is good .

    so , please tell me how to pass the values i need to pass .

     

    thanks a lot nicolette

  • 14. Re: Sending many parameters through the column link
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    newbi_egy wrote:

     

    > Instead of chancing PAT_TESTS by adding a ID as primary key. And maybe even a date for when the test was taken.

    i think you mean another table (patients) , and has a date field .

    No I do mean PAT_TESTS. And that is exactly my point. I think that a very realistic scenario is that a doctor takes a test on a patient to determine what is wrong. And then after the patient has undergo some treatment the same test is done again to check if the treatment was successful.

    Your datamodel is not able to handle this scenario.

     

    > When you have chosen a test that was done on a patient why would you change that to another test?

    i do not understand this , i do not want to  .

    What do you mean? Do you mean that you don't want to understand the question? Or that you don't want to change the test after the insert.

    Please be precise. It would really help if you start writing in full sentences and use proper punctuation.

    > Does the person that does the laboratory test need to see and know the patient information ?

    yes . because he is the doctor .

    And should he also be able to change that information every time a test is done. Or is doing the test and entering a test result a more frequently done task. And is it enough that the doctor sees the information of the client when entering the test. The patient information would still be updatable just under a different tab. Just like Customers and Orders are under different tabs  in the demo application.

    so , please tell me how to pass the values i need to pass .

    I told you how to pass a value of a page item in a report link in the very first sentence I posted in this tread.

    If you need to pass more than 3 values just add multiple page item names (separate by , ) in the item field and save the change. The link will now be shown as a url and you can add as many values as you need.

    Remember that the url is constructed when the page is rendered. So when you pass the test_no in the url the test_no will be the number it was on page rendering. And not the value the user has entered after rendering of a page. So the link would be useless for new rows.

     

    Nicolette

1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points