Announcement

Collapse
No announcement yet.

Action Button on Grid

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

  • Action Button on Grid

    Hi,

    i want to create an action button on a grid (record level) , when this button is pressed a date field must be altered for that record.

    How can i do this?


    thanks in advance....

    Regards

    Erwin

  • #2
    create a new field in your grid, then in the on record event create sonmething like:

    PHP Code:
    $link sc_make_link(<blank_application that receives the id of the record and changes the date>, ChangeDateToId= {idfield});
    {
    newfield} = '<button value={idfield} onclick=''' $link '">Change Date</button>'
    and.. thats it.. just remember to create the blank applicatino to change the date.

    Regards

    Comment


    • #3
      Ok, i've tried this :

      PHP Code:
      $link sc_make_link("blank_1"ChangeDateToId= {autoid});
      {
      Boekin} = '<button value={autoid} onclick=''' $link '">Change Date</button>'

      Blank_1 = the blank application
      Boekin = the added field
      autoid = id of the record which must be altered

      I'm getting this error when running the application :

      Parse error: syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING) in C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\app\HM\grid_Bo ekingen\grid_Boekingen_grid.class.php on line 1947

      What is going wrong? The blank appliaction is still 'blank'.

      Regards
      Erwin

      Comment


      • #4
        check the quotes in the button tag... you copied pasted what i sent and it has an error, check the double quotes.

        Regards

        Comment


        • #5
          Hi sempai kafe

          I was reading this post to try to use the sc_make_link for something but didn't work for me, don't if it's a bug or I'm doing something wrong

          here is the code in grid > on header

          My need is to make a small icon that links to another application and passes the parameter [glo_var1]=100 integer value


          Code:
          [icon_img] = "<img src='../_lib/img/sys__NM__ico__view.png' boarder='0' width='32px' height='32px' alt='View' title='view'></img>";
          
          [glo_var1]=100;
          $link1 = sc_make_link(grid36, param1=[glo_var1]); // I tried also to put direct glo_var=100 and [glo_var1]=100 as part of the $link variable but didn't work
          
          
          [output] = "<a href='".$link1."'>"[icon_img] "</a>";
          
          // where [output] is a value in the header to show on the grid in the header place...
          now, the image is not displaying, if replaced [icon_img] with "test" as string, it work and shows "test" text, link to application "grid36" works, but the parameter is not being passed...

          any clue?

          Comment


          • #6
            i think so:

            Is this the actual code?, could you please post the actual code you are using?.

            Regards

            Comment


            • #7
              oh kafe dude, didn't notice you replied here, will show you the code for sure, cya soon
              cheers

              Comment

              Working...
              X