• "Object variable not set" in Module: Function UIShowDialog Line: 56

    By Herr Vorragend 2 decades ago

    Action "Action&Close".

    Choosing "Close and Discard Changes"





    "Object variable not set" in Module: Function UIShowDialog Line: 56



    Line 56 is:

    Call wfUpdateActionHistory (currDoc, s.username, wfGetComponentByRef (tmpDoc.UserAction(0)).a_Name(0), tmpDoc.a_Comments(0))





    by the way: Great template - I love your application!

    • Got the same error...

      By Kevin Pettitt 2 decades ago

      …on the same line when I clicked "OK" on the Action/Close prompt with "Save in Current State" selected.

      • quick fix

        By Mark Demicoli 2 decades ago

        guys, this will be fixed in next release. You can patch it yourself if you like:



        script library: _QAF WF Runtime

        function: UIShowDialog



        replace line 56 with:



        If Not tmpDoc.UserAction(0) = ACTION_CLOSEDISCARD Then

        Call wfUpdateActionHistory (currDoc, s.username, wfGetComponentByRef (tmpDoc.UserAction(0)).a_Name(0), tmpDoc.a_Comments(0))

        End If

        • Alias problem

          By Bill Wheaton 2 decades ago

          This is an alias problem. The user choices all have aliases so they will work, but the one you mentioned (discard) and ACTION_SAVE don't have aliases, and that is the problem. I'm still looking for an elegant solution to any choice.



          I like the template btw. Lots of code though… my god. Needs some oop.



          -Bill Wheaton

          Lotus 911

          • Action aliases

            By Mark Demicoli 2 decades ago

            Bill, I am not from an OO background, unfortunately, and in my career as a Notes hacker (erm developer) I've only relatively recently understood OO and the benefits of such. At this point a rewrite is out of the question but your pointers regarding such an approach would be greatly appreciated.



            I'm trying to focus right now on producing doco but will add a feature (bug?) request to be included in V1.0. Expect that in the next 6 weeks.

            • By Bill Wheaton 2 decades ago

              Understood…. Not required though, your choice.



              I'm just now trying to grok the whole thing. I see what you mean by not wanting to record that as an event. Looking at it now, I tend to agree, I wouldn't either. on a fairly simple system.



              But let me relay a problem I've encountered recently in a different workflow I work with. Notes is really good at recording the current state of things, but when it comes to triggering things based on the transition of state it can get really hairy. Suppose I had a workflow that had the stages, "initial" ,"in production", "delivered", and over time, the "cancelled" stage for a contract tracking system… Works great as long as it is self contained. But when you have to interface it with another Oracle backend system that is trying to record every little state change. Transitions like "when did this thing change from "delivered" to "cancelled", and when did it get uncancelled and sent back to production or sales? Its tough if you don't have codes for everything. If you have to rely on a set of constant includes etc., its almost like hard coding, particularly when you have to check against them, and for multi-language support, its best to use codes rather than text. Probably the better thing to do would be to configure each and every choice as you did with the user choices, even the system ones, like that one, and then give each choice an attribute of "recordable" or some such. That way, its up to the routine that records history to figure out from the configuration if it should record it or not.



              Just my 2 cents.

              -Bill Wheaton

              Lotus 911

          • addendum

            By Mark Demicoli 2 decades ago

            Sorry I didn't realise you had responded to a thread… yes I get the picture now. Will address. Question is does one want the "Save with current Status" appearing in Action History?

    • bug still exists (ACTION_CLOSE)

      By Herr Vorragend 2 decades ago

      Hi,



      until version 1.01 the bug still exists for "ACTION_CLOSE"

      "Object variable not set" in Module: Function UIShowDialog Line: 57



      I changed your lines in function UIShowDialog to the following:


          If Not tmpDoc.UserAction(0) = ACTION_CLOSEDISCARD And Not tmpDoc.UserAction(0) = ACTION_SAVE And Not tmpDoc.UserAction(0) = ACTION_CLOSE And Not tmpDoc.UserAction(0) = ACTION_SAVENEWVERSION Then<br/>
              Call wfUpdateActionHistory (currDoc, s.username, wfGetComponentByRef (tmpDoc.UserAction(0)).a_Name(0), tmpDoc.a_Comments(0))<br/>
          End If <br/>
      







      I just added :

      … And Not tmpDoc.UserAction(0) = ACTION_CLOSE…

      • Thanks Herr <EOM>

        By Mark Demicoli 2 decades ago