Announcement

Collapse
No announcement yet.

[SOLVED]Bug or not? Run-Button and new field ...

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

  • [SOLVED]Bug or not? Run-Button and new field ...

    Hi,

    i have a grid with four fields from db table and one field via "New Field". All fields are strings.

    In event onRecord i have this code:

    Code:
    {my_field} = {dbfield_2};
    Running the grid is ok (two columns with identical content.

    Now, i create a run button (PHP). In OnRecord from the run button is this code:

    Code:
    $arr = [i];
    
    
    [marked_id][$arr] = {db_field_1};
    [marked_rec][$arr] = {db_field_2};    
    
    
    [i]++;
    This works. But i can't use:

    Code:
    $arr = [i];
    
    
    [marked_id][$arr] = {db_field_1};
    [marked_rec][$arr] = {myfield};    
    
    
    [i]++;
    This give a error "undefined identifier $myfield" ...

    Why?
    Last edited by RHS; 10-03-2014, 03:21 PM. Reason: correct fieldname
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

  • #2
    Nobody an idea?
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Posiblely {myfield} is not numeric or convert {myfield} to numeric;

      Comment


      • #4
        ???, why should i convert a text field to numeric? That makes no sense ...
        Best regards: - Reinhard -

        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

        Comment


        • #5
          Did you check the generated code for both? I suspect it bug to be honest..
          Try something else for fun:

          Code:
          $arr = [i];
          
          [marked_id][$arr] = {db_field_1};
          $temp = {myfield};
          [marked_rec][$arr] = $temp;    
          
          [i]++;
          if that does work then I really suspect another bug...

          on the other hand I am wondering why you use [marked_id]... instead of another solution like $marked_id[$arr]

          Comment


          • #6
            @rr :

            {myfield} (or other manuel fields) are empty and with error "undefined identifier $myfield" in run buttons OnRecord event.

            [marked_id] is used in run buttons OnFinish event, thats no change with $marked_id ... (look at documentation for run button).
            Best regards: - Reinhard -

            I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

            Comment


            • #7
              Hello,

              Issue reported to our bugs team.

              regards,
              Bernhard Bernsmann

              Comment


              • #8
                Hello,

                If possible, send us your application exported along with the CREATE tables involved so we can do a better analysis of your problem.
                Best Regards,
                John L. Santos

                Bug Tracker Team
                NetMake - IT Solutions

                Comment


                • #9
                  Sorry John, but this problem you can adjust within 60 seconds ... See post no. #1.
                  Best regards: - Reinhard -

                  I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                  Comment


                  • #10
                    Hello,

                    See my application and tell me if I'm doing as you.

                    Code:
                    {new} = {description};
                    
                    $arr = [i];
                    [marked_id][$arr]     = {categoryname};
                    [marked_rec][$arr]     = {new};
                    [i]++;
                    
                    echo "<pre>";
                    print_r($arr);
                    https://drive.google.com/file/d/0BwU...ew?usp=sharing
                    Best Regards,
                    John L. Santos

                    Bug Tracker Team
                    NetMake - IT Solutions

                    Comment


                    • #11
                      Hello John,

                      your example is working, but it's not that what i would like to do ...

                      If you move your line "{new} = {description};" to Events / onRecord your example does not work anymore ... although the field {new} exist and is filling in Events / onRecord.
                      Best regards: - Reinhard -

                      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                      Comment


                      • #12
                        A new bug: i have imported your example, but i can't delete ("User without permission!"). But i'am use user "admin" with full rights on all projects ...

                        Edit: Delete the permission for project "Test" and reassign the permission, the i could delete it ...
                        Last edited by RHS; 10-09-2014, 08:19 AM.
                        Best regards: - Reinhard -

                        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                        Comment


                        • #13
                          Originally posted by RHS View Post
                          A new bug: i have imported your example, but i can't delete ("User without permission!"). But i'am use user "admin" with full rights on all projects ...

                          Edit: Delete the permission for project "Test" and reassign the permission, the i could delete it ...
                          Mr. Reinhard,

                          Make sure that the "admin" user has all privileges allowed for the Test project, because I created it with another user.
                          Best Regards,
                          John L. Santos

                          Bug Tracker Team
                          NetMake - IT Solutions

                          Comment


                          • #14
                            Hello,

                            I'm forwarding your issue to our development team, soon I give you a return.
                            Best Regards,
                            John L. Santos

                            Bug Tracker Team
                            NetMake - IT Solutions

                            Comment


                            • #15
                              Hello,

                              Talking directly with our developer about your problem, so it is not a bug. Scriptcase makes treatment for virtual fields with "$this".

                              Therefore, for it to work you can use with any of the options below:
                              - The field must exist in the table.
                              - Use local variable.
                              - Use global variable.
                              Best Regards,
                              John L. Santos

                              Bug Tracker Team
                              NetMake - IT Solutions

                              Comment

                              Working...
                              X