5 Replies Latest reply on Aug 2, 2010 9:50 AM by carolyn

    Cancelling Edits In IWP without the Status Bar

    carolyn

      Title

      Cancelling Edits In IWP without the Status Bar

      Post

      Hi All,

      I have a new twist on this issue.  I am working with IWP.  I too am  trying to recreate the functionality of the IWP Cancel button in a  custom button.  Here is my problem.  I have  a portal.  Within the  portal is a field with a drop down list with the options include arrow  and auto complete using value list.  The field has a validation that the  value must be a member of the value list. 

      During a testing procedure, I noted it was possible for a user to not  select a value in theis field so when the request was sent back to the  database the validation error message displayed. I pressed OK.  The  problem record was still active; however, I was not able to do anything to  resolve the situation except click the cancel button in the status  area.  The problem is that I need to hide the status area for other  reasons, so I need to create a custom button to the the same thing.  So  far I have failed.

      I have tried:

      revert record

      revert record

      enter browse mode

      Exit script

      And possibly some other combinations.

      Any help would be appreciated.

      Thanks,

      Carolyn

        • 1. Re: Cancelling Edits In IWP without the Status Bar
          carolyn

          Also, as part of the validation above, the field can not be empty.

          • 2. Re: Cancelling Edits In IWP without the Status Bar
            philmodjunk

            I keep thinking there should be a better way but don't have an IWP set up to test.

            I suppose you could set up a group of global fields for data entry and when the user submits the data, use a script to copy the data into the correct fields if they pass validation. Then canceling the data entry is simply a matter of clearing the global fields...

            • 3. Re: Cancelling Edits In IWP without the Status Bar
              carolyn

              Hi Phil thanks again.  While this approach sounds very sound, it also sounds very labor intensive especially if portals are involved. Is there another approach?

              • 4. Re: Cancelling Edits In IWP without the Status Bar
                philmodjunk

                Well that's why I keep thinking there should be a better way :-(

                But since I don't have a DB set up as an IWP system to test, I'm limited to tossing out general suggestions for you to test.

                What if you put a "Submit" button on your layout that used a script to confirm valid data in each field and then used commit record to submit the changes only if they all passed validation? You could at least use a loop to validate the portal records that way...

                • 5. Re: Cancelling Edits In IWP without the Status Bar
                  carolyn

                  Hi Phil,

                  Thanks for the new approach.  It diffinately has opened my mind to think in new directions.  I looked through the functions and script steps.  Unless I missed a function or 2, I believe that inorder to do this, I would have to recreate the validation in code for each field with validation and compare the new value to it before commiting a record. While this approach does seem much less labor intensive, it still seems a little like we are taking the instant out of instant web publishing. 

                  I am going to see if I can restructure things a bit in the portal so that the strict validation will not be necessary there.

                  However, I'm sure I will be using a lot of what you told me at a later date.