Announcement

Collapse
No announcement yet.

Link to a grid from a Form

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

  • Link to a grid from a Form

    Hello everyone!

    I'm new using this tool and I'd like to know if it's possible to link a grid from my form.
    This is my case.

    I have an editable form with a list of items and other information.
    I have many suppliers for these items.
    I want to set a link in the form that gets the ID of one item and send it to a grid
    The grid must be displayed in the same window with the information of my suppliers for this specific item.

    I already have the grid but I don't know how to get the ID from the Form and display it as a pop-up.

    Thanks in advance for your help

  • #2
    Add a where to your grid

    Where yourfield = [glovar]

    Then, on your form, on your link, point to this grid and do glovar=youridfield

    From code is:

    sc_redir('yourgrid', globar={idfield}, 'modal');

    About modal I speak from memory and from mobile, search for sc_redir macro in webhelp
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Thank you so much for your help, worked perfectly!

      Comment


      • #4
        Originally posted by Giu View Post
        Add a where to your grid

        Where yourfield = [glovar]

        Then, on your form, on your link, point to this grid and do glovar=youridfield

        From code is:

        sc_redir('yourgrid', globar={idfield}, 'modal');

        About modal I speak from memory and from mobile, search for sc_redir macro in webhelp

        Hi,

        sorry i dont understand what i need to do, i have a grid and i need to redirect to a form with the details. I create a new field in the grid and add OnClick event and use the macro to redirect this way:

        sc_redir(global.php, idproject = {id_project}, _modal);

        The grid redirect to the aplication but not in the right id. How can i do it?

        Thank you

        Comment


        • #5
          Is global.php a form based on table projects?
          /Giuseppe

          Professional Scriptcase Services
          Some Customers opinions

          Comment


          • #6
            Originally posted by Giu View Post
            Is global.php a form based on table projects?
            Sorry global.php is a Grid slide based on a table for documentation of a project, i mean has id_proyect, details, pictures of before and after.

            And the grid is for validation so i want that when the validator see the grid of the projects to validate can click and redirect to Global Grid that has all the details. but to the right row. Right now only redirect me at the grid but on the first page

            Thank you for your help
            Last edited by steph07; 07-21-2015, 06:30 PM.

            Comment


            • #7
              If yiu are redirecting to a grid,and want the records be fileterd, then the way is as described . add a where on your SQL defining a global, and pass the value to this global.

              1. On the grid you want filters, on SQL, add "where filterfield=[filtercond] " now..filktercond is a global due to [ ]
              2. From where you call this grid, in your sc_redir pass the filter ton the global.
              Sc_redir(my grid, filtercond=mycondition)

              And thaths all.
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment

              Working...
              X