In our ExactTarget application we've used AMPscript and HTML to create forms which edit the data extensions. So far the edits have been to a single record per transaction. (edit the form content, click submit, one record gets updated) Now we need to update multiple records using checkboxes to change the status of multiple records in the data extension with a single click. What tools are required and how does the basic transaction work? Consider that we are already displaying a table with X# of rows and each has a checkbox input field with a GUID code (relating to the row/record) assigned to it. We select a sub set of the records by clicking their checkboxes and now we want all the SELECTED records to be updated at the same time. Where to begin? (and how to end?)
-
2If this question is more to do with programming then I would recommend posting it on stackoverflow as you'd probably get a better answer.– AmteraCommented Mar 20, 2014 at 13:01
-
I'll keep that in mind. While I am specifically working within ExactTarget I realize this is probably a more general question as well. Additionally it may serve a greater audience there too. I'll see what comes of this forum and consider posting there and perhaps linking between the two if they support each other. Thank you for suggesting that.– Jonny ShawCommented Mar 20, 2014 at 13:13
-
There are hundreds of ways to go about this, and there isn't one specific to AMPscript. This question really cannot be answered and is more solution architecture question.– Kelly J AndrewsCommented Mar 20, 2014 at 19:25
-
I don't really agree with some of that assessment. While perhaps true that there are countless ways to do it. I only need one and it doesn't need to be the most robust method. Sandeep was able to provide suggestions and help me move it forward. If you're not going to suggest methods could you at least provide me with some direction to determining where to look or how to process this? Meanwhile I can review BuildRowsetFromString() as Sandeep suggested.– Jonny ShawCommented Mar 21, 2014 at 15:31
-
As the developer, you would need to make the decisions on how to best approach the solution. The community doesn't know the full build as you do, and would only be taking guesses as to how this could work for you. The processing server side with AMPscript can take many forms, and while you only need one, no one on this forum will be able to determine what that one might be without a more thorough review of the code and set up.– Kelly J AndrewsCommented Mar 23, 2014 at 12:10
|
Show 1 more comment
1 Answer
As long as the checkboxes have the same name, you can then retrieve a comma delimited value of all the checkboxes that have been checked. You can then handle this information in PHP or any other programming language you're using.
-
Let me see if I understand correctly "The posted value will by default be a comma delimited list of all the selected checkbox values. Parsing this within AMPscript and assigning a unique variable to each of the "submit" buttons will determine the action taken. Using REQUESTPARAMETER() to set the variables for the action intended should allow the system to take whatever action was indicated by the button on all of the selected records." Is that correct? Commented Mar 20, 2014 at 13:23
-
1Yep that's right. You can use the
BuildRowsetFromString()
function in AMPScript and access all the checked values.– AmteraCommented Mar 21, 2014 at 9:35