tracker issue : CF-4098246

select a category, or use search below
(searches all categories and all time range)

Implement quotedValueArray() and .quotedValueArray()

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): / ext-user (Nitin Kumar)

Created: 12/10/2015

Components: Language, Functions

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: 296060 /

Priority/Frequency: Normal / Few users will encounter

Locale/System: English / Mac 10 All,Win XP All

Vote Count: 2

Problem: External user wants quotedValueArray() and .quotedValueArray() to be implemented .
valuearray(q, "myColumn") & query.valueArray('myColumn') have already been implemented . Bug #3499033

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4098246

Reason:	BugVerified

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:



It should've gone without saying that if you were implementing valueArray() then you also ought to have implemented quotedValueArray() at the same time, due to the analogy with valueList() / quotedValueList().
Vote by External U.
5124 | December 10, 2015 01:17:50 AM GMT
+1 - Thanks Nitin for filing this
Vote by External U.
5125 | December 10, 2015 02:45:31 AM GMT
I also really don't see harm in adding .valueList()/.quotedValueList(). Sometimes a list is all that's needed (i.e. if one is just outputting/writing the values as a string to somewhere instead of looping over them) and typing those would be shorter than chaining .valueArray().arrayToList(). If .valueList()/.quotedValueList() won't be added, then I'd deprecate valueList()/quotedValueList(). But if valueList()/quotedValueList() still have value (and I think they do if all one needs is a string), then .valueList()/.quotedValueList() should be added. Basically, I think it's best to have consistency and either support both or not support both. Thanks!, -Aaron
Comment by External U.
5121 | December 10, 2015 02:53:36 AM GMT
*bump* What about .valueList()/.quotedValueList()? valueList() and quotedValueList() are still useful when one only needs a string. Example: it's shorter than typing q.valueArray().arrayToList() and q.quotedValueArray().arrayToList(). Unnecessary typing. So these should also work: - valueList(query, "column") - q.valueList("column") - quotedValueList(query, "column") - q.quotedValueList("column") Thanks!, -Aaron
Comment by External U.
5122 | May 28, 2016 02:00:48 AM GMT
Regarding my previous post, I forgot about the delimiter parameter. Thus, the syntax would need to be (where delimiter parameter becomes a required parameter if columnName parameter exists): - valueList(query, columnName, delimiter) - q.valueList(columnName, delimiter) - quotedValueList(query, columnName, delimiter) - q.quotedValueList(columnName, delimiter) That is still shorter than typing q.valueArray(columnName).toList() (BTW, the .arrayToList(), in my previous comment, should've been .toList() - my bad) One use case for .valueList() is in a queryExecute() QoQ param. Example: {cfsqltype="cf_sql_integer", value=q1.valueList("id",","), list=true} that's shorter than (where getting as array, then converting to list, is unnecessary): {cfsqltype="cf_sql_integer", value=q1.valueArray("id").toList(), list=true} However.. it'd be even nicer if delimiter could be omitted when specifying column name. Thus, I guess I'll just wait until a language-clean-up version when we can change valueList()'s 1st parameter from "delimiter" to "columName". Thanks!, -Aaron
Comment by External U.
5123 | May 28, 2016 03:05:25 PM GMT
Comment by Aaron N.
31213 | August 26, 2019 05:36:27 AM GMT