Hi Mark,
        I'm coming into this discussion late but let me see if I get the
gist of what you are trying to do. You have a bunch of records (with their
own unique ID's) all to be listed on a single page. You then want to assign
a different value to each of them based upon some user input. You want the
user to click on one update button and have them all updated?

Is that what you mean?

-----Original Message-----
From: Jeff Fleitz [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 25, 2005 8:36 AM
To: [email protected]
Subject: Re: [plum] mass update


Hi Mark,

I don't think asking for help is uncouth or offensive, however I personally
don't have any time to chase this issue at 
this time, sorry.

Jeff



Mark Fuqua wrote:
> Hey Jeff,
> 
> I think I found an "easyish" way to cheat on the first page at least.  If
> you consider that any mass update or similar "mass" anything page, would
> more than likely be easier to handle with a hand crafted (Churvis speak)
> action page, I think it would be simple to put a <cfif> at the top of the
> following code to check for the label attribute of the
> <cf_displayDeleteCheckboxInList> tag (the attribute is referenced closer
to
> the top of the tag where the list table is formed).  If the label
attribute
> = update or send an email, the form could post to your hand crafted action
> page.  Additionally, that would give the checkboxes a label of Update, or
> Send Email or whatever and the link at the bottom could be changed as well
> to say [Update Selected Items] or [Send email to Selected].
> 
> This code is from the very end of <cf_displaylist>
> 
> IF YOU WERE TO PUT AN ADDITIONAL CRITERIA ON THE FIRST <CFIF> BELOW i.e.
> ADD THE LABEL ATTRIBUTE OF THE DISPLAYDELETECHECKBOXINLIST, THEN YOU COULD
> REPEAT THAT FIRST BLOCK OF CODE FOR THE DIFFERENT POSSIBILITIES.  I KNOW
> EVEN LESS ABOUT JAVASCRIPT THAN I DO ABOUT COLDFUSION SO I CAN'T CHANGE
THE
> CODE LOWER DOWN ABOUT WHERE TO POST THE MASS DELETE STUFF AND CHECKING TO
> SEE THAT THERE ARE CHECKBOXES CHECKED, BUT I BET IF YOU DID, IT WOULD GIVE
> YOU FORM VARIABLES WHICH WOULD BE THE PK'S OF ALL THE CHECKED ITEMS ON
> WHATEVER ACTION PAGE YOU POSTED TO.
> 
> John, Tim, David, Adam, Jeff...anyone feel so inclined?  Not that it would
> in anyway compensate in and of itself, but since I really can't help on
the
> coding end, I would be more than willing to contribute a $50 gift
> certificate to the corporate restaurant of one's choosing or Amazon or
> something (someone please tell me if that is uncouth or offensve on a
> mailing list).
> 
> Thanks,
> 
> Mark
> 
> 
> <cfoutput>
>       <cfif Request.lastPage GT 1 OR StructKeyExists(ThisTag,
"massDelete")>
>               <form name="PageForm#Request.listInstanceNumber#"
> action="#CGI.Script_Name#" method="get">
>               <input type="hidden" name="rand" value="#CreateUUID()#">
>               <cfset wedge = "">
>               <cfif GetBaseTagList() CONTAINS "FORM">
>                       <cfloop collection="#URL#" item="currentKey">
>                               <cfif
>
ListFindNoCase("FromAction,FromSort,SortOrder,rand,#Attributes.table#Page",
> ReReplaceNoCase(currentKey, "^amp;", "")) EQ 0>
>                                       <input type="hidden"
name="#ReReplaceNoCase(currentKey, '^amp;', '')#"
> value="#URL[currentKey]#">
>                                       <cfset wedge = wedge & "&" &
ReReplaceNoCase(currentKey, "^amp;", "") &
> "=" & URLEncodedFormat(URL[currentKey])>
>                               </cfif>
>                       </cfloop>
>               </cfif>
>               <tr>
>                       <td colspan="#Request.numListColumns#" nowrap>
>                               <table cellpadding="0" cellspacing="0"
border="0" width="100%">
>                               <tr
class="#Application.Formatting.AlternateRowShading(currentRow)#">
>                               <cfif StructKeyExists(ThisTag,
"massDelete")>
>                                       <td class="leftalign">
>                                               [<a
href="javascript:if(checkMassDelete#Request.listInstanceNumber#())
> document.MassDeleteForm#Request.listInstanceNumber#.submit();">Delete
> selected items</a>]
>                                       </td>
>                               </cfif>
> 
>                               <cfif Request.lastPage GT 1>
>                                       <td class="rightalign">
>                                       <cfif
Evaluate("#Attributes.table#page") NEQ 1><a
> href="#CGI.Script_Name#?#Attributes.table#page=1#wedge#">&lt;&lt;
> First</a></cfif>&nbsp;
>                                       <cfif
Evaluate("#Attributes.table#page") NEQ 1><a
>
href="#CGI.Script_Name#?#Attributes.table#page=#Evaluate('#Attributes.table#
> page') - 1##wedge#">&lt; Previous</a></cfif>&nbsp;
>                                       Page <select
name="#Attributes.table#page"
> onchange="document.PageForm#Request.listInstanceNumber#.submit();">
>                                       <cfloop from="1"
to="#Request.lastPage#" index="i">
>                                               <option value="#i#"<cfif
Evaluate("#Attributes.table#page") EQ i>
> selected</cfif>>#i#</option>
>                                       </cfloop>
>                                       </select> of
#Request.lastPage#&nbsp;
>                                       <cfif
Evaluate("#Attributes.table#page") NEQ Request.lastPage><a
>
href="#CGI.Script_Name#?#Attributes.table#page=#Evaluate('#Attributes.table#
> page') + 1##wedge#">Next &gt;</a></cfif>&nbsp;
>                                       <cfif
Evaluate("#Attributes.table#page") NEQ Request.lastPage><a
>
href="#CGI.Script_Name#?#Attributes.table#page=#Request.lastPage##wedge#">La
> st &gt;&gt;</a></cfif>&nbsp;
>                                       </td>
>                               </cfif>
> 
>                               </tr>
>                               </table>
>                       </td>
>               </tr>
>               </form>
>       </cfif>
>       </cfoutput>
> 
>       <cfoutput></table></cfoutput>
> 
>       <cfif Attributes.displayALinkToThisSearchForm NEQ "No" AND NOT
> StructKeyExists(ThisTag, "searchForms")>
>               <cfoutput>[<a
href="#Attributes.displayALinkToThisSearchForm#">Back to
> Search</a>]</cfoutput>
>       </cfif>
> </cfif>
> <cfsetting enablecfoutputonly="No">
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Jeff
> Fleitz
> Sent: Wednesday, August 24, 2005 4:43 PM
> To: [email protected]
> Subject: Re: [plum] mass update
> 
> 
> Ok, I understand.  I think your approach is sound and I can't think of a
> better alternative. There is going to be a lot
> of mods involved.  You might just want to go the way of creating your own
> custom tags by copying the ones being used for
> mass deletes and then modifying them for updates, as opposed to trying to
> mod the existing tags.  All these tags are
> nested and it makes it very hard to work with, as you saw from our
endeavor
> last week.
> 
> I think these are the tags involved with mass deletes, but do the search
to
> verify:
> 
> cf_DisplayList
> cf_DeleteRecord
> cf_DisplayDeleteCheckboxInList
> 
> 
> I think having a mass 'action' tag would be great, for not just doing
> updates, but sending mailings, etc.
> 
> Jeff
> 
> Mark Fuqua wrote:
> 
>>Jeff,
>>
>>Here is the scenario, maybe you can offer an alternative.  I am certainly
>>not married to any one idea of how to get it done.
>>
>>I have a table called LaborSteps.  Each labor step has a status column:
>>Status=1=not complete; status=2=complete; status=3=complete and quality
>>checked; status=4=complete, quality checked and paid.  There are three
>>additional fields that are involved:  CompletedBy, CheckedBy, DatePaid.
>>
>>A list of these labor steps for each job is lengthy.  Maybe 200-300+.  So
>>doing individual updates is not practical.  The idea is to make the form
>>submission quick and easy.  Filter the list on status (there would be
> 
> three
> 
>>different forms but all would essentially increase the status value by one
>>and insert a userId or date)  On the form the user would choose a name
> 
> from
> 
>>a drop down list, or enter a date (DoneBy or CheckedBy or DatePaid), check
>>the appropriate records to update and hit submit.
>>
>>This has been on my mind literally for three years, so what I just typed
>>makes since  to me (I see it in my sleep) but I know from trying to
> 
> explain
> 
>>this to others it might not make since to the person reading it.  If it
>>doesn't make since, let me know.  I am eager for input and input is not
>>possible if you can't understand what I am trying to do.
>>
>>Thanks,
>>
>>Mark
>>
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] Behalf Of Jeff
>>Fleitz
>>Sent: Wednesday, August 24, 2005 3:54 PM
>>To: [email protected]
>>Subject: Re: [plum] mass update
>>
>>
>>Have fun with this one.
>>
>>Most of the functionality for this is handled in the DisplayList and
>>DeleteRecord tags (search on massDelete).  The
>>DeleteRecord tag will loop over the pk's provided by the DisplayList tag
> 
> and
> 
>>invoke the DeleteRecord method of the
>>DatabaseBlocks component for each pk.
>>
>>You will have to make heavy mods to the DisplayList tag to mimic the
>>massDelete functinality.
>>
>>I am curious as to why you need a mass update checkbox in the first place?
>>Updates are done to discrete rows one at a
>>time. I don't see the benefit of what you are trying to do.
>>
>>Jeff
>>
>>
>>Mark Fuqua wrote:
>>
>>
>>>I need to build a list with a "mass update" checkbox similar to mass
>>
>>delete.
>>
>>
>>>I am guessing that the mass delete "action" takes place in the
>>>databaseBlocks.cfc.
>>>
>>>I notice when I look at the <displayDeleteCheckBoxInList>, that there is
>>
>>an
>>
>>
>>>attribute named label, which has a default value of "delete".  My update
>>>will change one field value from x to x+1 and another field value from
>>>"null" to a plumUserId(integer) value. The PlumUserId value would be a
>>>session variable.
>>>
>>>Does anyone have any idea how hard it would be to check the
>>
>>attribute.label
>>
>>
>>>of the <displayDeleteCheckBoxInList> checked from  within the
>>>databaseBlock.cfc (or whatever does the mass delete) and if the value is
>>>"update" have it run the code necessary for this type of multiple update,
>>>instead of the mass delete?
>>>
>>>Would anyone else find such a functionality valuable?
>>>
>>>Mark
>>>
>>>
>>>
>>>
>>>
>>>
>>>**********************************************************************
>>>You can subscribe to and unsubscribe from lists, and you can change
>>>your subscriptions between normal and digest modes here:
>>>
>>>http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
>>>**********************************************************************
>>>
>>>
>>
>>
>>**********************************************************************
>>You can subscribe to and unsubscribe from lists, and you can change
>>your subscriptions between normal and digest modes here:
>>
>>http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
>>**********************************************************************
>>
>>
>>
>>**********************************************************************
>>You can subscribe to and unsubscribe from lists, and you can change
>>your subscriptions between normal and digest modes here:
>>
>>http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
>>**********************************************************************
>>
>>
> 
> 
> **********************************************************************
> You can subscribe to and unsubscribe from lists, and you can change
> your subscriptions between normal and digest modes here:
> 
> http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
> **********************************************************************
> 
> 
> 
> **********************************************************************
> You can subscribe to and unsubscribe from lists, and you can change
> your subscriptions between normal and digest modes here:
> 
> http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
> **********************************************************************
> 
> 

**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:

http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************

**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:

http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************

Reply via email to