No announcement yet.

Run Button

  • Filter
  • Time
  • Show
Clear All
new posts

  • Run Button


    I made a run button following scriptcase example on giving 5% discount and it work beautifully.

    But, what if I want to give custom discount value?

    What I'm actually trying to do is, update multiple record with 3 different custom value for 3 different field.


    id name date collected status note
    1 aaa
    2 bbb
    3 ccc
    4 ddd

    I want to update record 1 to 3 with todays date, status of "Collected" and note of "all ok"

    i tried to use sc_redir to a custom form in "On Records" but it wont return the session value.

    any chances of doing this?

  • #2
    hello... any hint/idea?


    • #3
      Can you explain more what are you trying to do? Where you have this "run" button? customn value depends on values of database? or introduced by the user? Give more data.


      Professional Scriptcase Services
      Some Customers opinions


      • #4
        hi Giu, thanks for replying.

        I'm trying to update multiple record with a value introduced by user, on the table when browsing record.

        for example, I got 20 record and I want to give 20% discount to 4 people because I like them, but I only want to give 4% discount to another 10 because I dont like them and I want to give 50% discount to 3 other records because they're my boss.

        I would like to have a modal/dialog to come out so I can type any discount I want when I clicked the button.

        I tried to make a html form, using sc_redir to a control form, but not successful.


        • #5
          Process all rows and pass it to a control app, for example, where you can input the value you need to apply. Use Run button to collect all records selected and store on an array, redirect (sc_redir on modal mode) to a control app asking for the value you want to apply and then, do an UPDATE to the array records


          Professional Scriptcase Services
          Some Customers opinions


          • #6
            Thanks alot Giu!
            I finally succeed after looking at your array idea and follow example on this topic

            now I just need to find out how to make ajax refresh after updating those value


            • #7
              Try with a sc_redir over itself.

              Professional Scriptcase Services
              Some Customers opinions


              • #8
                well, sc_redir will redirect into the modal making it overlapped.

                updated : sc_redir using _parent work!!! thanksss again!
                Last edited by resakse; 06-03-2014, 03:43 PM.


                • #9
                  Well i'm working with runbuttons and I need to know how can I collect all the selected records. I tried to check the link suggested above but it's not working anymore. Any suggestions please


                  • #10

                    The Run button has two events OnRecord and OnFinish. You can collect whatever you need in the first event and then execute upon the selected on the second one. You can check the Scriptcase samples/tutorials and Webhelp on this topic.