VBScript Reference Lib
This should be simple, but does anyone know the Import Reference one would need to allow VBScript activities to function. I'm working with a simple script to parse some stings and the "Left" function cannot be found. It seems I don't have the proper language references imported. Any ideas would be appreciated. Thanks.
-
Hi Chris,
You'll want to inport "Microsoft.Visualbasic" namespace.
regards,
Edmond
http://msdn.microsoft.com/en-us/library/y050k1wb(v=vs.90).aspx
0 -
Hi Edmond,
It may be something else because I confirmed Microsoft.VisualBasic, ...Activites and ...CompilerServices were all there...and they are.
I will poke around some more, I'm sure I missed something.
Thanks,
Chris
0 -
Hi Chris,
here is a siple example workflow showing the left function. It may be an issue on how you are trying to call/use the function.
regards,
Edmond
<Activity mc:Ignorable="sap sads" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="274,290" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client"
xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client"
xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core"
xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi"
xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi"
xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting"
xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow"
xmlns:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=Microsoft.VisualBasic"
xmlns:mv1="clr-namespace:Microsoft.VisualBasic;assembly=System"
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
xmlns:s="clr-namespace:System;assembly=System.Core"
xmlns:s1="clr-namespace:System;assembly=System"
xmlns:s2="clr-namespace:System;assembly=mscorlib"
xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="234,210" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Default="Hello World" Name="myString" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<gwa1:Alert sap:VirtualizedContainerService.HintSize="212,86" Text="[Left(myString,5)]" Title="Left Example" />
</Sequence>
</Activity>0 -
Thanks Edmond, I'll take a look at this when I get a moment.
0 -
Your example worked for me as well, in an Alert. But when I attempt to do the same "Left" function in a VB script, or even an Assign....it does not.
0 -
Update: It appears the Assign activity (which was my first attempt as trimming my string) now works. I used an Assign with "Left(strCondition,Len(strCondition)-1)" and it works! I don't know if turning Button Validation on has anything to do with this...but now I no longer need the VB Script.
Thanks for the feedback everyone.
0 -
I am trying to get the users ip address when tracking site hits, anyone know how to get the request.servervariables to function? The get request info module doesnt seem to return what I need when converted to string.
0 -
Hi Chris
have not tried it myself but there is a workflow activity called Get Request Info that may be useful to achieving what you need
Regards
Ralph
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
8 Kommentare