Solved

ListLast, ListFirst

Posted on 2006-06-19
2
515 Views
Last Modified: 2013-12-24
below (code)  allows me to get both prodId and price out of the form on one value using ListFirst and ListLast, thats fine. but i would like to add another i.e. have this... <option value="#prodId# - #price# - #name#">#name#</option></cfoutput>


-WHAT I HAVE SO FAR THAT GETS TWO
-FORM WITH QUERY-
<cfloop query="searchQuery">
<cfoutput><option value="#prodId# - #price#">#name#</option></cfoutput>
</cfloop>

-GET ALL VALUES-
<cfloop list="#select2List#" index="i">
<cfset prodId = ListFirst(#i#,"-")>
<cfset price = ListLast(#i#,"-")>
<cfloop> etc
0
Comment
Question by:pigmentarts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
mkishline earned 500 total points
ID: 16935696
<cfoutput query="searchQuery">
  <option value="#prodId# - #price# - #name#">#name#</option>
</cfoutput>

<cfloop list="#select2List#" index="i">
  <cfset prodID = ListFirst(i,'-') />
  <cfset price = ListGetAt(i,2,'-') />
  <cfset name = ListLast(i,'-') />
</cfloop>
0
 
LVL 12

Author Comment

by:pigmentarts
ID: 16935777
thank you!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question