Home › Forums › QuickApps Forum › Syntax for using ResultFromAction
- This topic is empty.
- 06/27/2012 at 11:40 am #4169
I am trying to use ResultFromAction in a Custom Action where I perform the following:
1. I create a new Invoice from an Entity I have setup already (This works).
2. I want to use a result I should be getting back from this action called ScopeID that will be the new ID of the Invoice just created. In SQL I am using SCOPE_IDENTITY() to pass back the new ID value. This is working within SQL Mgmt Studio at least. I would like to use it as part of the next Operation where I pass that value as part of a GoToUrl string, where the next page is expecting “?InvoiceID=<ScopeID>”
It appears that ResultFromAction can do what I need here, but I am not clear on how all the parts work together. I tried the following:
<ActionItem ID=”InvoiceProject” Text=”Invoice this project”>
<Action Name=”CreateNewInvoice” Type=”ExecuteOperation” OpenURL=”CurrentWindow” Operation=”CreateNewInvoiceGetID.CreateNewInvoiceGetID” />
<Action Name=”EditInvoice” Type=”GoToURL” URL=”/SiteAssets/EditInvoice.aspx” OpenURL=”CurrentWindow”>
<Parameter Name=”InvoiceID” Source=”ResultFromAction” SourceName=”CreateNewInvoice.ScopeID” />
However this results in: The following error occurred: Parameter Source Name ‘CreateNewInvoice.ScopeID’ specifies a source ‘ScopeID’ that is not supported.
I reviewed the documentation, but am still unclear on the syntax here. Any assistance is greatly appreciated.
- 06/27/2012 at 11:40 am #4937
I figured this out. I found the documentation a bit lacking here. Here are my findings:
1. This doesn't appear to work with a qSIListForm, only qSIListView
2. The Syntax is <ActionName>.OutParameter.<VariableName>.Value
Once I do this I am able to use the returned value as a Parameter in an HTTP string. So if the variable I have in my stored proceedure is @ScopeID, like above, and the ExecuteOpertaion name is "CreateER", then the syntax for the ResultFromAction would be "CreateER.OutParameter.ScopeID.Value".
You must be logged in to reply to this topic.