Announcement

Collapse
No announcement yet.

what's missing in this form?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    what's missing in this form?



    Hello ,

    <MvFUNCTION NAME = "BatchReportModule_Report" PARAMETERS = "batch_id" STA
    ...
    ...
    ...
    <FORM NAME="Myform" ACTION="{encodeentities(g.sessionurl)}" METHOD="post">
    <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Batch_Find_ID( g.Batch_ID ) }">
    <INPUT TYPE="hidden" NAME="Screen" VALUE="BRPT">
    <INPUT TYPE="hidden" NAME="Action" VALUE="BRPT">
    <INPUT TYPE="hidden" NAME ="Store_Code" VALUE = "{ encodeentities( Stores.d.code ) }">
    <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">
    <INPUT TYPE="hidden" NAME="Batch_ID" VALUE="{ Batches.d.id }">
    <INPUT TYPE="hidden" NAME="tab" VALUE="">
    <INPUT TYPE="hidden" NAME="ui_flag" VALUE="runfunction">
    <input type="submit" value="Run this function">
    </form>
    ...
    ...

    Running this form in a batch report module. In 4.12, when submit button is
    clicked, it returns to the document and runs the batch report module
    IDS_MyModulecode as predicted.

    However, the same code compiled, returns to the Run Report screen but
    doesn't run the module code. Is there another parameter that needs to
    passed? I don't I have access to admin.mvc source to verify this -- at
    least I can't find the source to 4.20 through 4.23.

    Any ideas?

    For reference, the <INPUT TYPE="hidden" NAME="ui_flag"
    VALUE="runfunction"> is set to run the function I need to execute.

    TIA
    --
    Best regards,
    Scott
    mailto:[email protected]




    #2
    what's missing in this form?



    Scott,

    Remove the "g." on this line:

    <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">

    See if that helps...

    Darren Ehlers
    OpenUI Developer Consortium
    <A HREF ="http://www.openui.org/ ">http://www.openui.org/ </A>

    Double the speed of your OpenTokens, only $40!!
    <A HREF ="http://www.mivacentral.com/openui/?product=OPENUI-TURBO ">http://www.mivacentral.com/openui/?product=OPENUI-TURBO </A>

    > -----Original Message-----
    > From: [email protected]
    > [mailto:[email protected]] On Behalf Of Scott Shepard
    > Sent: Tuesday, November 23, 2004 11:46 PM
    > To: [email protected]
    > Subject: [mrc] what's missing in this form?
    >
    >
    > Hello ,
    >
    > <MvFUNCTION NAME = "BatchReportModule_Report" PARAMETERS =
    > "batch_id" STA
    > ...
    > ...
    > ...
    > <FORM NAME="Myform" ACTION="{encodeentities(g.sessionurl)}"
    > METHOD="post">
    > <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE =
    > "{ Batch_Find_ID( g.Batch_ID ) }">
    > <INPUT TYPE="hidden" NAME="Screen" VALUE="BRPT">
    > <INPUT TYPE="hidden" NAME="Action" VALUE="BRPT">
    > <INPUT TYPE="hidden" NAME ="Store_Code" VALUE = "{
    > encodeentities( Stores.d.code ) }">
    > <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">
    > <INPUT TYPE="hidden" NAME="Batch_ID" VALUE="{ Batches.d.id }">
    > <INPUT TYPE="hidden" NAME="tab" VALUE="">
    > <INPUT TYPE="hidden" NAME="ui_flag" VALUE="runfunction">
    > <input type="submit" value="Run this function">
    > </form>
    > ...
    > ...
    >
    > Running this form in a batch report module. In 4.12, when
    > submit button is
    > clicked, it returns to the document and runs the batch report module
    > IDS_MyModulecode as predicted.
    >
    > However, the same code compiled, returns to the Run Report screen but
    > doesn't run the module code. Is there another parameter that needs to
    > passed? I don't I have access to admin.mvc source to verify this -- at
    > least I can't find the source to 4.20 through 4.23.
    >
    > Any ideas?
    >
    > For reference, the <INPUT TYPE="hidden" NAME="ui_flag"
    > VALUE="runfunction"> is set to run the function I need to execute.
    >
    > TIA
    > --
    > Best regards,
    > Scott
    > mailto:[email protected]
    >
    >
    >

    Comment


      #3
      Re[2]: what's missing in this form?



      Hi Scott,

      All variables that you pass through a form are automatically globals. By
      adding a scope, you actually create a variable called g.g.variable_name.

      Markus




      -----Original Message-----
      From: [email protected] [mailto:[email protected]]
      On Behalf Of Scott Shepard
      Sent: Mittwoch, 24. November 2004 20:26
      To: Darren Ehlers
      Cc: [email protected]
      Subject: Re[2]: [mrc] what's missing in this form?

      Hello Darren,

      Thanks. I'm not sure why it would be a factor though. Do form using
      Mivascript/MM not like to be passed globals? Does allocate the wrong amount
      of space for that var?

      Thanks, again,

      Scott
      IDS

      Wednesday, November 24, 2004, 7:44:36 AM, you wrote:

      DE> Scott,

      DE> Remove the "g." on this line:

      DE> <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">

      DE> See if that helps...

      DE> Darren Ehlers
      DE> OpenUI Developer Consortium
      DE> <A HREF ="http://www.openui.org/">http://www.openui.org/</A>

      DE> Double the speed of your OpenTokens, only $40!!
      DE> <A HREF ="http://www.mivacentral.com/openui/?product=OPENUI-TURBO">http://www.mivacentral.com/openui/?product=OPENUI-TURBO</A>

      >> -----Original Message-----
      >> From: [email protected]
      >> [mailto:[email protected]] On Behalf Of Scott Shepard
      >> Sent: Tuesday, November 23, 2004 11:46 PM
      >> To: [email protected]
      >> Subject: [mrc] what's missing in this form?
      >>
      >>
      >> Hello ,
      >>
      >> <MvFUNCTION NAME = "BatchReportModule_Report" PARAMETERS = "batch_id"
      >> STA ...
      >> ...
      >> ...
      >> <FORM NAME="Myform" ACTION="{encodeentities(g.sessionurl)}"
      >> METHOD="post">
      >> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{
      >> Batch_Find_ID( g.Batch_ID ) }"> <INPUT TYPE="hidden" NAME="Screen"
      >> VALUE="BRPT"> <INPUT TYPE="hidden" NAME="Action" VALUE="BRPT"> <INPUT
      >> TYPE="hidden" NAME ="Store_Code" VALUE = "{ encodeentities(
      >> Stores.d.code ) }"> <INPUT TYPE="hidden" NAME="g.Module_Code"
      >> VALUE="IDS_MyModulecode"> <INPUT TYPE="hidden" NAME="Batch_ID"
      >> VALUE="{ Batches.d.id }"> <INPUT TYPE="hidden" NAME="tab" VALUE="">
      >> <INPUT TYPE="hidden" NAME="ui_flag" VALUE="runfunction"> <input
      >> type="submit" value="Run this function"> </form> ...
      >> ...
      >>
      >> Running this form in a batch report module. In 4.12, when submit
      >> button is clicked, it returns to the document and runs the batch
      >> report module IDS_MyModulecode as predicted.
      >>
      >> However, the same code compiled, returns to the Run Report screen but
      >> doesn't run the module code. Is there another parameter that needs to
      >> passed? I don't I have access to admin.mvc source to verify this --
      >> at least I can't find the source to 4.20 through 4.23.
      >>
      >> Any ideas?
      >>
      >> For reference, the <INPUT TYPE="hidden" NAME="ui_flag"
      >> VALUE="runfunction"> is set to run the function I need to execute.
      >>
      >> TIA
      >> --
      >> Best regards,
      >> Scott
      >> mailto:[email protected]
      >>
      >>
      >>

      Comment


        #4
        Re[2]: what's missing in this form?



        Hello Darren,

        Thanks. I'm not sure why it would be a factor though. Do form using
        Mivascript/MM not like to be passed globals? Does allocate the wrong
        amount of space for that var?

        Thanks, again,

        Scott
        IDS

        Wednesday, November 24, 2004, 7:44:36 AM, you wrote:

        DE> Scott,

        DE> Remove the "g." on this line:

        DE> <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">

        DE> See if that helps...

        DE> Darren Ehlers
        DE> OpenUI Developer Consortium
        DE> <A HREF ="http://www.openui.org/ ">http://www.openui.org/ </A>

        DE> Double the speed of your OpenTokens, only $40!!
        DE> <A HREF ="http://www.mivacentral.com/openui/?product=OPENUI-TURBO ">http://www.mivacentral.com/openui/?product=OPENUI-TURBO </A>

        >> -----Original Message-----
        >> From: [email protected]
        >> [mailto:[email protected]] On Behalf Of Scott Shepard
        >> Sent: Tuesday, November 23, 2004 11:46 PM
        >> To: [email protected]
        >> Subject: [mrc] what's missing in this form?
        >>
        >>
        >> Hello ,
        >>
        >> <MvFUNCTION NAME = "BatchReportModule_Report" PARAMETERS =
        >> "batch_id" STA
        >> ...
        >> ...
        >> ...
        >> <FORM NAME="Myform" ACTION="{encodeentities(g.sessionurl)}"
        >> METHOD="post">
        >> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE =
        >> "{ Batch_Find_ID( g.Batch_ID ) }">
        >> <INPUT TYPE="hidden" NAME="Screen" VALUE="BRPT">
        >> <INPUT TYPE="hidden" NAME="Action" VALUE="BRPT">
        >> <INPUT TYPE="hidden" NAME ="Store_Code" VALUE = "{
        >> encodeentities( Stores.d.code ) }">
        >> <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">
        >> <INPUT TYPE="hidden" NAME="Batch_ID" VALUE="{ Batches.d.id }">
        >> <INPUT TYPE="hidden" NAME="tab" VALUE="">
        >> <INPUT TYPE="hidden" NAME="ui_flag" VALUE="runfunction">
        >> <input type="submit" value="Run this function">
        >> </form>
        >> ...
        >> ...
        >>
        >> Running this form in a batch report module. In 4.12, when
        >> submit button is
        >> clicked, it returns to the document and runs the batch report module
        >> IDS_MyModulecode as predicted.
        >>
        >> However, the same code compiled, returns to the Run Report screen but
        >> doesn't run the module code. Is there another parameter that needs to
        >> passed? I don't I have access to admin.mvc source to verify this -- at
        >> least I can't find the source to 4.20 through 4.23.
        >>
        >> Any ideas?
        >>
        >> For reference, the <INPUT TYPE="hidden" NAME="ui_flag"
        >> VALUE="runfunction"> is set to run the function I need to execute.
        >>
        >> TIA
        >> --
        >> Best regards,
        >> Scott
        >> mailto:[email protected]
        >>
        >>
        >>

        Comment


          #5
          Re[4]: what's missing in this form?



          Hello Markus,

          Doh! You know, I knew that...(picture an image of me beating my head against
          the monitor screen). What does not make sense, it works fine
          uncompiled.

          Makes perfect sense...I think functions have similar behavior?

          Thanks,

          Scott
          IDS

          Wednesday, November 24, 2004, 11:24:32 AM, you wrote:

          M> Hi Scott,

          M> All variables that you pass through a form are automatically globals. By
          M> adding a scope, you actually create a variable called g.g.variable_name.

          M> Markus




          M> -----Original Message-----
          M> From: [email protected] [mailto:[email protected]]
          M> On Behalf Of Scott Shepard
          M> Sent: Mittwoch, 24. November 2004 20:26
          M> To: Darren Ehlers
          M> Cc: [email protected]
          M> Subject: Re[2]: [mrc] what's missing in this form?

          M> Hello Darren,

          M> Thanks. I'm not sure why it would be a factor though. Do form using
          M> Mivascript/MM not like to be passed globals? Does allocate the wrong amount
          M> of space for that var?

          M> Thanks, again,

          M> Scott
          M> IDS

          M> Wednesday, November 24, 2004, 7:44:36 AM, you wrote:

          DE>> Scott,

          DE>> Remove the "g." on this line:

          DE>> <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">

          DE>> See if that helps...

          DE>> Darren Ehlers
          DE>> OpenUI Developer Consortium
          DE>> <A HREF ="http://www.openui.org/">http://www.openui.org/</A>

          DE>> Double the speed of your OpenTokens, only $40!!
          DE>> <A HREF ="http://www.mivacentral.com/openui/?product=OPENUI-TURBO">http://www.mivacentral.com/openui/?product=OPENUI-TURBO</A>

          >>> -----Original Message-----
          >>> From: [email protected]
          >>> [mailto:[email protected]] On Behalf Of Scott Shepard
          >>> Sent: Tuesday, November 23, 2004 11:46 PM
          >>> To: [email protected]
          >>> Subject: [mrc] what's missing in this form?
          >>>
          >>>
          >>> Hello ,
          >>>
          >>> <MvFUNCTION NAME = "BatchReportModule_Report" PARAMETERS = "batch_id"
          >>> STA ...
          >>> ...
          >>> ...
          >>> <FORM NAME="Myform" ACTION="{encodeentities(g.sessionurl)}"
          >>> METHOD="post">
          >>> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{
          >>> Batch_Find_ID( g.Batch_ID ) }"> <INPUT TYPE="hidden" NAME="Screen"
          >>> VALUE="BRPT"> <INPUT TYPE="hidden" NAME="Action" VALUE="BRPT"> <INPUT
          >>> TYPE="hidden" NAME ="Store_Code" VALUE = "{ encodeentities(
          >>> Stores.d.code ) }"> <INPUT TYPE="hidden" NAME="g.Module_Code"
          >>> VALUE="IDS_MyModulecode"> <INPUT TYPE="hidden" NAME="Batch_ID"
          >>> VALUE="{ Batches.d.id }"> <INPUT TYPE="hidden" NAME="tab" VALUE="">
          >>> <INPUT TYPE="hidden" NAME="ui_flag" VALUE="runfunction"> <input
          >>> type="submit" value="Run this function"> </form> ...
          >>> ...
          >>>
          >>> Running this form in a batch report module. In 4.12, when submit
          >>> button is clicked, it returns to the document and runs the batch
          >>> report module IDS_MyModulecode as predicted.
          >>>
          >>> However, the same code compiled, returns to the Run Report screen but
          >>> doesn't run the module code. Is there another parameter that needs to
          >>> passed? I don't I have access to admin.mvc source to verify this --
          >>> at least I can't find the source to 4.20 through 4.23.
          >>>
          >>> Any ideas?
          >>>
          >>> For reference, the <INPUT TYPE="hidden" NAME="ui_flag"
          >>> VALUE="runfunction"> is set to run the function I need to execute.
          >>>
          >>> TIA
          >>> --
          >>> Best regards,
          >>> Scott
          >>> mailto:[email protected]
          >>>
          >>>
          >>>

          Comment


            #6
            Re[4]: what's missing in this form?



            Hi Scott

            .... That's one of the more subtle differences between compiled vs.
            uncompiled... -probably not entirely planned. If I remember correctly,
            Miva's developers experimented quite a bit with the way how forms pass
            variables, structures and arrays, and some early beta versions of EmpresaVM
            came up with some funnies here and there. But you are right, this and the
            obvious macro-issues are probably the most important things to consider when
            converting uncompiled scripts to a compiled version.

            Inside functions it's a bit different. By default, an unscoped var (and
            those that are declared outside of a function) is global and available
            outside of the function, however it leaves some space for ambiguity. So if
            call a variable without indicating its scope, the script looks first for a
            value of s.var, if not found then d.var, then g.var, and finally l.var.
            Quite often this saves your butt when you forgot to indicate the scope, but
            it's also a reliable source of possible bugs. For that reason its always
            better to indicate it. In any event, I'd actually prefer that unscoped
            variables were treated like locals.

            If you use structures, another interesting aspect comes into play: Since
            member names can be just about anything (with very few exceptions), it is
            possible to have a structure like "g.struc:g.lalala". Looks strange, but
            works perfectly fine. In the beginning of my programs, I always catch all
            variables from the command line and place them into a structure, called
            g.input_variables, and then empty out the orginal variable values. This way,
            I don't run the risk of having some unexpected globals floating around just
            because someone found it smart to add them through the url or POST. Of
            course, in your example from yesterday, this would suddenly create a
            structure g.input_variables:g.posted_var, instead of
            g.input_variables:posted_var. Welcome in the land of confusion...

            Markus







            -----Original Message-----
            From: Scott Shepard [mailto:[email protected]]
            Sent: Donnerstag, 25. November 2004 03:36
            To: MvMarkus
            Cc: 'Darren Ehlers'; [email protected]
            Subject: Re[4]: [mrc] what's missing in this form?

            Hello Markus,

            Doh! You know, I knew that...(picture an image of me beating my head against
            the monitor screen). What does not make sense, it works fine uncompiled.

            Makes perfect sense...I think functions have similar behavior?

            Thanks,

            Scott
            IDS

            Wednesday, November 24, 2004, 11:24:32 AM, you wrote:

            M> Hi Scott,

            M> All variables that you pass through a form are automatically globals.
            M> By adding a scope, you actually create a variable called
            g.g.variable_name.

            M> Markus




            M> -----Original Message-----
            M> From: [email protected]
            M> [mailto:[email protected]]
            M> On Behalf Of Scott Shepard
            M> Sent: Mittwoch, 24. November 2004 20:26
            M> To: Darren Ehlers
            M> Cc: [email protected]
            M> Subject: Re[2]: [mrc] what's missing in this form?

            M> Hello Darren,

            M> Thanks. I'm not sure why it would be a factor though. Do form using
            M> Mivascript/MM not like to be passed globals? Does allocate the wrong
            M> amount of space for that var?

            M> Thanks, again,

            M> Scott
            M> IDS

            M> Wednesday, November 24, 2004, 7:44:36 AM, you wrote:

            DE>> Scott,

            DE>> Remove the "g." on this line:

            DE>> <INPUT TYPE="hidden" NAME="g.Module_Code" VALUE="IDS_MyModulecode">

            DE>> See if that helps...

            DE>> Darren Ehlers
            DE>> OpenUI Developer Consortium
            DE>> <A HREF ="http://www.openui.org/">http://www.openui.org/</A>

            DE>> Double the speed of your OpenTokens, only $40!!
            DE>> <A HREF ="http://www.mivacentral.com/openui/?product=OPENUI-TURBO">http://www.mivacentral.com/openui/?product=OPENUI-TURBO</A>

            >>> -----Original Message-----
            >>> From: [email protected]
            >>> [mailto:[email protected]] On Behalf Of Scott Shepard
            >>> Sent: Tuesday, November 23, 2004 11:46 PM
            >>> To: [email protected]
            >>> Subject: [mrc] what's missing in this form?
            >>>
            >>>
            >>> Hello ,
            >>>
            >>> <MvFUNCTION NAME = "BatchReportModule_Report" PARAMETERS = "batch_id"
            >>> STA ...
            >>> ...
            >>> ...
            >>> <FORM NAME="Myform" ACTION="{encodeentities(g.sessionurl)}"
            >>> METHOD="post">
            >>> <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{
            >>> Batch_Find_ID( g.Batch_ID ) }"> <INPUT TYPE="hidden" NAME="Screen"
            >>> VALUE="BRPT"> <INPUT TYPE="hidden" NAME="Action" VALUE="BRPT">
            >>> <INPUT TYPE="hidden" NAME ="Store_Code" VALUE = "{ encodeentities(
            >>> Stores.d.code ) }"> <INPUT TYPE="hidden" NAME="g.Module_Code"
            >>> VALUE="IDS_MyModulecode"> <INPUT TYPE="hidden" NAME="Batch_ID"
            >>> VALUE="{ Batches.d.id }"> <INPUT TYPE="hidden" NAME="tab" VALUE="">
            >>> <INPUT TYPE="hidden" NAME="ui_flag" VALUE="runfunction"> <input
            >>> type="submit" value="Run this function"> </form> ...
            >>> ...
            >>>
            >>> Running this form in a batch report module. In 4.12, when submit
            >>> button is clicked, it returns to the document and runs the batch
            >>> report module IDS_MyModulecode as predicted.
            >>>
            >>> However, the same code compiled, returns to the Run Report screen
            >>> but doesn't run the module code. Is there another parameter that
            >>> needs to passed? I don't I have access to admin.mvc source to verify
            >>> this -- at least I can't find the source to 4.20 through 4.23.
            >>>
            >>> Any ideas?
            >>>
            >>> For reference, the <INPUT TYPE="hidden" NAME="ui_flag"
            >>> VALUE="runfunction"> is set to run the function I need to execute.
            >>>
            >>> TIA
            >>> --
            >>> Best regards,
            >>> Scott
            >>> mailto:[email protected]
            >>>
            >>>
            >>>

            Comment

            Working...
            X