10 Replies Latest reply on Aug 18, 2006 10:29 PM by 438472

    Select list with Redirect => other page items are reseted

    438472
      Hi,

      created a form with a report (2 pages).

      On the second page I can maintain the data (about 30 input fields).
      This page includes 3 LOVs which are depending on the first LOV (L_GMBH) which is displayed as "Select list with Redirect". The dependent LOVs are shown correctly. But if I choose another value from L_GMBH all other fields (Text-Fields, LOVs, ...) which I filled with new values are reseted.

      How can I change the Value of the select list without deleting the changes I made?

      The data should only be saved in the database when I press the save ore insert button. By changing the value of the LOV (L_GMBH) only the dependend LOVs and dependend fields should be refreshed.

      Thanks in advance


      Ulrike
        • 1. Re: Select list with Redirect => other page items are reseted
          partlycloudy
          Use a "Select list with Submit" so that all form items are saved into session state and re-displayed when the page refreshes.

          The data should only be saved in the database when I press the save ore insert button

          Make those after-submit processes conditionally fire only when the Save or Insert button is pressed.
          • 2. Re: Select list with Redirect => other page items are reseted
            438472
            Which "Source Used" do I have to choice?

            The HTML-generation set "Source Used" on
            "Always, replacing any existing value in Session State".

            Is this correct?

            Thanks in advance
            • 3. Re: Select list with Redirect => other page items are reseted
              partlycloudy
              Thats fine, the "Source Used" attribute is not really relevant to this discussion.
              • 4. Re: Select list with Redirect => other page items are reseted
                438472
                Hi,

                the after submit process fires only with submit and insert.
                When I select a value of my lov (list of value with submit) I branch on the same page and all changes are reseted. I see the original data from the database.

                So I changed the condition for the "On-LOAD-After Header" Process.
                The result is that an empty input page is displayed.

                That's why I asked for the "Source Used" field.

                I only need a refresh of the input page when I select one value of my LOV.
                (because another LOV depends on this LOV-Value)
                The changes I made in the session should be remain.

                Thanks
                • 5. Re: Select list with Redirect => other page items are reseted
                  partlycloudy
                  Hm, this is not going to be easy. I didn't realize that your page was a single-record Form on a table/view.

                  For these type of pages, the Source type is set to "Always,..." and the Automatic Row Fetch process populates these items based on the PK item.

                  When you change the first select list, the page submits and when it refreshes, any form items you changed are discarded and repopulated by the ARF process since their source it set to "Database column", not the usual Only.../"Static Assignment".

                  Frankly, I don't think this is possible. In other words, cascading LOV items are not going to be possible to implement on a Form page since the Source is a database column and not session state.

                  I am sure someone will correct me if I am wrong.
                  • 6. Re: Select list with Redirect => other page items are reseted
                    528661
                    Ulrike

                    I had the same problem.

                    My solution was to create a wizard instead of using a form. That way you can break up your editing and populate your form using session state.

                    For example.

                    In step 1 - Item 1 is a select list with redirect.
                    - Item 2 is a select list populated from Item 1.
                    - Item 3 is a text field.

                    In step 2 - Item 1 is a select list populated from Step1.Item 1.
                    - Item 2 is a select list populated from Step1.Item1 & Step1.Item 2.

                    You get the idea.

                    You can go on for about 8 steps I think so your wizard can be quite complex in terms of fields to fill in.

                    Hope this made sense and is of some value.

                    Ps you will need to create a process to perform the DML afterwards on your last step but that shouldnt be too tricky. I managed it!!

                    James
                    • 7. Re: Select list with Redirect => other page items are reseted
                      John Vaughan
                      Ulrike - although I think the best of way of doing this might be through JavaScript, I have definitely set the source to be 'Only...' for database columns and got it working. I think the trick there is knowing when to reset the page so that the values are refreshed from the database when you want them to be.

                      Another method is to put a condition on the 'Fetch row from...' process.

                      If you have a page item called P1_LOAD, you can set this to Y when you first load the page. You make the 'Fetch row from...' process conditional on P1_LOAD being Y.

                      Then add a page process to fire after the 'Fetch row from...' process that sets P1_LOAD to N.

                      I have a feeling that that's unnecessary, but it certainly works.

                      Hope this helps.

                      Regards,

                      John.
                      • 8. Re: Select list with Redirect => other page items are reseted
                        438472
                        Hi John,


                        thanks.

                        I've solved my problem in the same way.
                        I set the source to be 'Only ....' for all DB-Columns and use an application item for the refresh. This works fine. This application item do I use in the conditions for 'Fetch row from' and 'Process Row ...'.

                        Have a nice day


                        Regards Ulrike
                        • 9. Re: Select list with Redirect => other page items are reseted
                          438472
                          Hi James,

                          thanks for this idea! I'll try this solution for my next page.

                          I've solved my problem in the same way than John.
                          I set the source to be 'Only ....' for all DB-Columns and use an application item for refresh. This works fine. This application item do I use in the conditions for 'Fetch row from' and 'Process Row ...'.

                          Have a nice day.

                          Kind regards Ulrike
                          • 10. Re: Select list with Redirect => other page items are reseted
                            438472
                            Hi John,

                            I had a problem with the session item values but now it works fine.

                            So I cancelled my message!

                            Regards
                            Ulrike

                            Message was edited by:
                            ulrike.frehner@itellium.com