/
DataTableExpressionAndDistinct.xaml
130 lines (130 loc) · 10.2 KB
/
DataTableExpressionAndDistinct.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<Activity mc:Ignorable="sap sap2010" x:Class="DataTableExpressionAndDistinct" sap:VirtualizedContainerService.HintSize="390,191" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<scg:List x:TypeArguments="x:String" Capacity="32">
<x:String>System.Activities</x:String>
<x:String>System.Data</x:String>
<x:String>System</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>System.IO</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
</scg:List>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<scg:List x:TypeArguments="AssemblyReference" Capacity="16">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.DataSetExtensions</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
</scg:List>
</TextExpression.ReferencesForImplementation>
<Sequence DisplayName="datatable-Expression&Distinct" sap:VirtualizedContainerService.HintSize="200,66" sap2010:WorkflowViewState.IdRef="Sequence_2">
<Sequence.Variables>
<Variable x:TypeArguments="sd:DataTable" Name="dt" />
<Variable x:TypeArguments="sd:DataColumn" Default="[new DataColumn("NewColumn")]" Name="dtCol" />
<Variable x:TypeArguments="sd:DataTable" Name="dt2" />
</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>
<ui:BuildDataTable DataTable="[dt]" DisplayName="Build Data Table" sap:VirtualizedContainerService.HintSize="334,59" sap2010:WorkflowViewState.IdRef="BuildDataTable_2" TableInfo="<NewDataSet>
 <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
 <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="TableName" msdata:UseCurrentLocale="true">
 <xs:complexType>
 <xs:choice minOccurs="0" maxOccurs="unbounded">
 <xs:element name="TableName">
 <xs:complexType>
 <xs:sequence>
 <xs:element name="Dept" type="xs:string" minOccurs="0" />
 <xs:element name="Team" type="xs:string" minOccurs="0" />
 <xs:element name="Member" type="xs:int" minOccurs="0" />
 <xs:element name="Etc" type="xs:string" default="&quot;abc def&quot;" minOccurs="0" />
 </xs:sequence>
 </xs:complexType>
 </xs:element>
 </xs:choice>
 </xs:complexType>
 </xs:element>
 </xs:schema>
 <TableName>
 <Dept>A</Dept>
 <Team>A1</Team>
 <Member>7</Member>
 <Etc>"A Dept A1 Team"</Etc>
 </TableName>
 <TableName>
 <Dept>A</Dept>
 <Team>A2</Team>
 <Member>5</Member>
 <Etc>"A Dept A2 Team"</Etc>
 </TableName>
 <TableName>
 <Dept>B</Dept>
 <Team>B1</Team>
 <Member>10</Member>
 <Etc>"B Dept B1 Team"</Etc>
 </TableName>
 <TableName>
 <Dept>B</Dept>
 <Team>B2</Team>
 <Member>4</Member>
 <Etc>"B Dept B2 Team"</Etc>
 </TableName>
</NewDataSet>">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:BuildDataTable>
<WriteLine DisplayName="Write Line" sap:VirtualizedContainerService.HintSize="334,61" sap2010:WorkflowViewState.IdRef="WriteLine_3" Text="[dt.Compute("sum(Member)","Dept='A'").ToString]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</WriteLine>
<Assign DisplayName="Assign-Distinct" sap:VirtualizedContainerService.HintSize="334,60" sap2010:WorkflowViewState.IdRef="Assign_3">
<Assign.To>
<OutArgument x:TypeArguments="sd:DataTable">[dt2]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="sd:DataTable">[dt.DefaultView.ToTable(true,{"Dept"})]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
<ui:AddDataColumn x:TypeArguments="x:Int32" AllowDBNull="{x:Null}" AutoIncrement="{x:Null}" ColumnName="{x:Null}" DefaultValue="{x:Null}" MaxLength="{x:Null}" Unique="{x:Null}" Column="[dtCol]" DataTable="[dt]" DisplayName="Add Data Column" sap:VirtualizedContainerService.HintSize="334,22" sap2010:WorkflowViewState.IdRef="AddDataColumn`1_2" />
<Assign sap:VirtualizedContainerService.HintSize="334,60" sap2010:WorkflowViewState.IdRef="Assign_4">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[dtCol.Expression]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">Member * 3000</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
<WriteLine DisplayName="Write Line" sap:VirtualizedContainerService.HintSize="334,61" sap2010:WorkflowViewState.IdRef="WriteLine_4" Text="[dt.Compute("sum(Member)","true").ToString]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</WriteLine>
<ui:FilterDataTable DataTable="[dt]" DisplayName="Filter Data Table" FilterRowsMode="Keep" sap:VirtualizedContainerService.HintSize="334,59" sap2010:WorkflowViewState.IdRef="FilterDataTable_1" OutputDataTable="[dt2]" SelectColumnsMode="Keep">
<ui:FilterDataTable.Filters>
<scg:List x:TypeArguments="ui:FilterOperationArgument" Capacity="4">
<ui:FilterOperationArgument BooleanOperator="And" Operator="EQ">
<ui:FilterOperationArgument.Column>
<InArgument x:TypeArguments="x:String">["DEPT"]</InArgument>
</ui:FilterOperationArgument.Column>
<ui:FilterOperationArgument.Operand>
<InArgument x:TypeArguments="x:String">["A"]</InArgument>
</ui:FilterOperationArgument.Operand>
</ui:FilterOperationArgument>
</scg:List>
</ui:FilterDataTable.Filters>
<ui:FilterDataTable.SelectColumns>
<scg:List x:TypeArguments="InArgument" Capacity="4">
<x:Null />
</scg:List>
</ui:FilterDataTable.SelectColumns>
</ui:FilterDataTable>
<Assign sap:VirtualizedContainerService.HintSize="334,64" sap2010:WorkflowViewState.IdRef="Assign_30">
<Assign.To>
<OutArgument x:TypeArguments="sd:DataTable">[dt2]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="sd:DataTable" xml:space="preserve">[(From row In dt.AsEnumerable
Where row("DEPT").Equals("B")
).CopyToDataTable]</InArgument>
</Assign.Value>
</Assign>
<WriteLine DisplayName="Write Line" sap:VirtualizedContainerService.HintSize="334,61" sap2010:WorkflowViewState.IdRef="WriteLine_29" Text="[dt2.Rows.Count.Tostring]" />
</Sequence>
</Activity>