5 Replies Latest reply: Feb 5, 2014 12:41 AM by Bhushan53 RSS

    Dynamic questions on forms

    789736

      Hi guys,

       

      I was wondering if it is possible to generate dynamic questions in oracle forms.  I would plan to have a database table which contains the questions which users can add,alter or delete from.  Once the questions get saved and the user opens the specified form I was wondering if it would be possible in any way to automaticaly generate these questions on the form.  This gets complicated when questions are different lengths etc so having a static x,y position for each question wouldnt suffice.  I was wondering would it be possible via a javabean or something?  Any help regarding this would be greatly appreciated.

       

      Thanks.

       


        • 1. Re: Dynamic questions on forms
          Michael Ferrante-Oracle

          I have two questions for you:

           

          1.  Exactly which Forms version are you using?  Please do not say "10g", "11g", "6i" as these are marketing names.  Please provide the numbers (e.g.  11.1.2.2)

           

          2.  What do you mean by "questions"?  Something like, "What color is the sky?"

           

          Please provide more detail on what you are trying to do.  Anything is possible.  The issue is more about how creative you are able to be

          • 2. Re: Dynamic questions on forms
            789736

            Hi,

             

            Thanks for the response.  I am currently using version 10.1.2.0.2.

             

            Yea, questions along the lines of:

             

            What type of car do you drive?

             

            What year is your car?

             

            What is your registration?

             

            What kind of car would you like in the future?

            Basically, I will have created a screen where the users can simply input any number of questions they wish but rather than me checking to see when they have updated this table or altered anything and then manually updating the corresponding form to reflect these changes I would like forms to dynamically generate these questions on the corresponding form.  This way as soon as a question is changed or altered and the user goes to the corresponding form the question will have automatically updated on the screen.

             

            Thanks again.

            • 3. Re: Dynamic questions on forms
              user346369

              > ...rather than me checking to see when they have updated this table or altered anything and then manually updating the corresponding form to reflect these changes I would like forms to dynamically generate these questions on the corresponding form.

               

              What is the end-use / purpose of that "corresponding form"?   Do you need to alter the space for the answers to the questions?

               

              If it is just changing the display of the questions, you can make display-only fields on a form look like boilerplate prompts.   That is pretty easy.   Just query the questions table when the form starts (when-new-form-instance trigger).

              • 4. Re: Dynamic questions on forms
                789736

                Yes, space will need altered for the questions in which the response could be input via a radio button/text box/checkbox or some other way.  I need something which will allow the end user to maintain this and simply add/edit or delete a question and input what type of response ie radio button/checkbox etc would be associated with the question.  If i do this in forms I will require say 100 of each type of item, ie 100 radio buttons, 100 checkboxes, 100 text boxes and then enable them as required and hide the rest.  If later down the line the users have 101 questions which have a checkbox as an answer im then going to have to go and edit the form to add another checkbox.  Im wondering is there a better solution than this, perhaps using Java?

                 

                Thanks for your suggestions to date. Appreciate them.

                • 5. Re: Dynamic questions on forms
                  Bhushan53

                  Yes, java neans can be used. JTF grids would i believe suit the requirement of variable length.