Run Button

hi,

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.

Example:

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?

hello… any hint/idea?

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.

Regards.

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.

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

http://www.scriptcase.net/docs/es_es/manual_mp.htm#aplicaciones-de-grid/grid/buttons/boton-run

Thanks alot Giu!
I finally succeed after looking at your array idea and follow example on this topic http://www.scriptcase.net/forum/showthread.php?6180-Printing-multiple-PDF-reports

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

Try with a sc_redir over itself.

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

updated : sc_redir using _parent work!!! thanksss again!

Hi
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

CTTah:

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.