Solved

multiple cfinvokes and one url variable

Posted on 2004-04-26
6
414 Views
Last Modified: 2013-12-24
in the below the first cfinvoke returns variable 'anOID'

how do i reference this as an arguemnt passed to the next cfinvoke?

also , did i correctly reference the URL id?

<cfif isDefined("url.addProdID")>
<cfinvoke component="api/cartservice" method="newCart" >
</cfinvoke>
<cfinvoke component="api/cartservice" method="addCartItem" >
<cfinvokeargument name="cartoid" value="anOID">
<cfinvokeargument name="itemoid" value="url.addProdID">
<cfinvokeargument name="quantity" value="1">
</cfinvoke>
</cfif>
0
Comment
Question by:finnstone
  • 4
6 Comments
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 250 total points
ID: 10924521
<cfinvokeargument name="itemoid" value="url.addProdID"> should be <cfinvokeargument name="itemoid" value="#url.addProdID#">
Not sure what your after with your first question?
0
 

Author Comment

by:finnstone
ID: 10924537
well the newCart method returns a variable using cfreturn calling anOID, i was wondering how i can refer to it now that it has been returned?

do i need #s
0
 
LVL 18

Accepted Solution

by:
Plucka earned 250 total points
ID: 10924538
Hi finnstone,

On your first <cfinvoke specify the returnvariable

<cfinvoke component="api/cartservice" method="newCart" returnvariable="anOID">

On your call use that variable.

<cfinvokeargument name="cartoid" value="#anOID#">

Did you know you can do this.

<cfinvoke component="api/cartservice" method="addCartItem" cartoid="#anOID#" itemoid="#url.addProdID#" quantity="1">

All on one line.

Regards
Plucka
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:finnstone
ID: 10924544
thx guys
0
 

Author Comment

by:finnstone
ID: 10924743
i got this error that anOID is undefined


Variable ANOID is undefined.

The error occurred in line 13

 
11 : </cfinvoke>
12 : <cfinvoke component="htmlcartservice" method="addCartItem" >
13 : <cfinvokeargument name="cartoid" value="#anOID#">
14 : <cfinvokeargument name="itemoid" value="#url.addProdID#">
15 : <cfinvokeargument name="quantity" value="1">

 
0
 

Author Comment

by:finnstone
ID: 10924818
never mind i got it heres the whole thing



<cfif isDefined("url.addProdID")>
<cfinvoke component="htmlcartservice" method="newCart" returnvariable="anOID" >
</cfinvoke>
<cfinvoke component="htmlcartservice" method="addCartItem" >
<cfinvokeargument name="cartoid" value="#anOID#">
<cfinvokeargument name="itemoid" value="#url.addProdID#">
<cfinvokeargument name="quantity" value="1">
</cfinvoke>
</cfif>
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WSUS Client Issues 52 1,673
Firewall Speed Issue 6 68
how to setup ssl access to internal local machine 4 115
WebSite Direction 1 42
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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