2 Replies Latest reply on Jun 29, 2016 5:27 AM by nadams RSS
    nadams Explorer

    Can I get the button that triggered a service in the script of that service?

    I have a script that returns an infotable of dates (to drive a report). I want to provide three buttons to trigger different results from this script. for yesterday, last week and last 30 days.

     

    The script works by setting the end date to yesterday and the start date to yesterday -0, -7 or -30 doys.

     

    What I want to do is assiocate the number with each of the buttons, which when clicked will trigger the script but the value 0, 7, 30 would be avilable in the script.

     

    I've tried setting the number in the buttons contextid but can't see a way to pass this into the script as I can only bind one button to the input parameter. I have also tried binding the button to another script which sets a session parameter (programmatically) but this requires a browser refresh to update the session parameter so it not practical.

     

    is there anyway to get the button that triggered a service?