Announcement

Collapse
No announcement yet.

sc_label() macro not working with variable as parameter?

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

  • sc_label() macro not working with variable as parameter?

    hi,
    sc_label() macro not working with variable as parameter as the help says.
    Only works with field name .
    Is this a bug?

    regards

  • #2
    I didn't tried but, if help sais, is not a bug
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Como hablas español, te contesto a ver si me entiendes mejor.
      "La macro sc_label NO FUNCIONA con variable como parámetro como dice el help"
      "SOLO funciona con el nombre de campo como constante, como se ve en ex.1"
      "Los Ex.2 y 3 no funcionan (es un bag?) o bien estoy usando mal (NO HAY EJEMPLOS REALES!!!)
      understand?

      WebHelp: sc_label({My_Field})
      This macro its used to modify dynamically the grid form field label.
      Ex. 1: Using the field name.
      sc_label("Customer") = "Cust Name";
      Ex. 2: Using a variable as paramenter.
      sc_label({Customer}) = "Cust Name";
      Ex. 3: Using a global variable.
      sc_label([global_variable]) = "Cust Name";

      Comment


      • #4
        Hello,

        Issue reported to our bugs team.

        regards,
        Bernhard Bernsmann

        Comment


        • #5
          Originally posted by anibal View Post
          Como hablas español, te contesto a ver si me entiendes mejor.
          "La macro sc_label NO FUNCIONA con variable como parámetro como dice el help"
          "SOLO funciona con el nombre de campo como constante, como se ve en ex.1"
          "Los Ex.2 y 3 no funcionan (es un bag?) o bien estoy usando mal (NO HAY EJEMPLOS REALES!!!)
          understand?

          WebHelp: sc_label({My_Field})
          This macro its used to modify dynamically the grid form field label.
          Ex. 1: Using the field name.
          sc_label("Customer") = "Cust Name";
          Ex. 2: Using a variable as paramenter.
          sc_label({Customer}) = "Cust Name";
          Ex. 3: Using a global variable.
          sc_label([global_variable]) = "Cust Name";
          Ok, te entendí mal, el que falla es el 2. Sample 1 and 3 works.
          /Giuseppe

          Professional Scriptcase Services
          Some Customers opinions

          Comment


          • #6
            Originally posted by Giu View Post
            Ok, te entendí mal, el que falla es el 2. Sample 1 and 3 works.
            "SOLO funciona ex.1" (SOLAMENTE, ÚNICAMENTE, EXCLUSIVAMENTE)
            "Los Ex.2 y 3 no funcionan" (2 Y 3 NO FUNCIONAN, NO ANDAN, NO TRABAJAN, NO FUNCAN...)
            understand?

            Comment


            • #7
              Originally posted by bartho View Post
              Hello,

              Issue reported to our bugs team.

              regards,
              Bernhard Bernsmann
              muchas gracias, saludos
              thank you very much, regards

              Comment


              • #8
                Originally posted by anibal View Post
                "SOLO funciona ex.1" (SOLAMENTE, ÚNICAMENTE, EXCLUSIVAMENTE)
                "Los Ex.2 y 3 no funcionan" (2 Y 3 NO FUNCIONAN, NO ANDAN, NO TRABAJAN, NO FUNCAN...)
                understand?
                Lo he probado, y el 3, pasando el nombre del campo en una global si funciona. Igualmente, Bartho ya ha comentado que lo revisarían.
                /Giuseppe

                Professional Scriptcase Services
                Some Customers opinions

                Comment


                • #9
                  Originally posted by Giu View Post
                  Lo he probado, y el 3, pasando el nombre del campo en una global si funciona. Igualmente, Bartho ya ha comentado que lo revisarían.
                  Si anda la 3 me salvaría por el momento. Lo probé así y no me anda:
                  $i = 1;
                  [glo_campo] = ("CAMPO" . $i);
                  echo [glo_campo];
                  sc_label([glo_campo]) = {rs[0][2]};

                  Me podes pasar tu prueba?
                  Gracias

                  Comment


                  • #10
                    Simplemente cogi un form y use un sc_label pasándole una global, le ponía valor en ejecución en el onscriptinit si no recuerdo mal.

                    Estas usando sc_label en un evento valido? Tus campos en la BbDd se llaman campo mas un número?
                    /Giuseppe

                    Professional Scriptcase Services
                    Some Customers opinions

                    Comment


                    • #11
                      Originally posted by Giu View Post
                      Simplemente cogi un form y use un sc_label pasándole una global, le ponía valor en ejecución en el onscriptinit si no recuerdo mal.

                      Estas usando sc_label en un evento valido? Tus campos en la BbDd se llaman campo mas un número?
                      Estoy usando SC8.0.9. Si lo haces andar en el form, en el evento q' sea, me avisas. Gracias.

                      [glo_campo] = "CAMPO1"; //nombre del campo en la db
                      sc_label([glo_campo]) = "XXXXXXXXXX"; //etiqueta que quiero muestre para el campo

                      Comment


                      • #12
                        Captura.JPG

                        Captura2.JPG

                        Captura3.JPG
                        /Giuseppe

                        Professional Scriptcase Services
                        Some Customers opinions

                        Comment


                        • #13
                          Hello,

                          I tested it on my system and got some difficulty in visualizing the macro is used WebHelp. I am reporting this problem for the development sector so it can be corrected both the understanding of the scope of the macro as their functionality on itself.

                          Thank you!
                          Best regards,
                          Thomas Soares.
                          ScriptCase International.

                          Email: t.soares@scriptcase.net
                          Visit our Blog: http://www.scriptcase.net/blog/
                          Visit out fan page: http://www.facebook.com/Scriptcase

                          Comment


                          • #14
                            I would like to inform you that the macro is running normally, the problem is just the information in WebHelp Scriptcase that are not clear.

                            To use the first option from exmplo of the manual is simple, just put the name of the field protected with quotes like this:

                            sc_label("field_name") = "Custom Field Name";

                            To use the second option (attributes), you must first create an attribute, see image 1:

                            attribute.jpg
                            (image 1)

                            After that just write the code:

                            {your_attribute} = "field_name";
                            sc_label({your_attribute}) = "Custom Field Name";

                            And the third example explained above by another user:

                            [your_global] = "field_name";
                            sc_label([your_global]) = "Custom Field Name";

                            Thank you.
                            Best regards,
                            Thomas Soares.
                            ScriptCase International.

                            Email: t.soares@scriptcase.net
                            Visit our Blog: http://www.scriptcase.net/blog/
                            Visit out fan page: http://www.facebook.com/Scriptcase

                            Comment

                            Working...
                            X