Not able to add columns to Document Library from Visual Studio template - sharepoint-2013

I am trying to create new document library from SharePoint project template from Visual Studio 2015.
While doing so I am able to create Document Library Template and Instance. Also if I deploy solution to one of my site it creates list as well. Strange thing is if I add a column to the template and then deploy it creates the list but does not create new custom column.
Below is the schema file for the template.
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="SharedDocuments" Direction="$Resources:Direction;" Url="SharedDocuments" BaseType="1" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE">
<MetaData>
<ContentTypes>
<ContentType ID="0x0101000dba2955561e4de0a115152637e9f8e2" Name="ListFieldsContentType">
<FieldRefs>
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" />
<FieldRef ID="{4b1bf6c6-4f39-45ac-acd5-16fe7a214e5e}" Name="TemplateUrl" />
<FieldRef ID="{cd1ecb9f-dd4e-4f29-ab9e-e9ff40048d64}" Name="xd_ProgID" />
<FieldRef ID="{fbf29b2d-cae5-49aa-8e0a-29955b540122}" Name="xd_Signature" />
<FieldRef ID="{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}" Name="Combine" />
<FieldRef ID="{5d36727b-bcb2-47d2-a231-1f0bc63b7439}" Name="RepairDocument" />
<FieldRef ID="{8f838bdc-4b95-4b26-b86f-3025d2df964f}" Name="TestColumn" />
</FieldRefs>
</ContentType>
<ContentTypeRef ID="0x0101">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
</ContentTypes>
<Fields>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,Title;" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title"></Field>
<Field ID="{4b1bf6c6-4f39-45ac-acd5-16fe7a214e5e}" Type="Text" Name="TemplateUrl" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Template_Link;" XName="TemplateUrl" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" PITarget="mso-infoPathSolution" PIAttribute="href" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="TemplateUrl"></Field>
<Field ID="{cd1ecb9f-dd4e-4f29-ab9e-e9ff40048d64}" Type="Text" Name="xd_ProgID" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Html_File_Link;" XName="ProgID" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_ProgID"></Field>
<Field ID="{fbf29b2d-cae5-49aa-8e0a-29955b540122}" Type="Boolean" Group="_Hidden" Name="xd_Signature" DisplaceOnUpgrade="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_Signature" DisplayName="$Resources:core,Xml_signed;" XName="{FBF29B2D-CAE5-49aa-8E0A-29955B540122}" Filterable="TRUE" Sortable="TRUE" Sealed="TRUE" Hidden="TRUE" FromBaseType="TRUE" ReadOnly="TRUE"></Field>
<Field ID="{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}" ReadOnly="TRUE" Type="Computed" Name="Combine" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Merge;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Combine">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="EncodedAbsUrl" />
<FieldRef Name="TemplateUrl" />
</FieldRefs>
</Field>
<Field ID="{5d36727b-bcb2-47d2-a231-1f0bc63b7439}" ReadOnly="TRUE" Type="Computed" Name="RepairDocument" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Relink;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="RepairDocument">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="ID" />
</FieldRefs>
</Field>
<Field Name="TestColumn" ID="{8f838bdc-4b95-4b26-b86f-3025d2df964f}" DisplayName="TestColumn" Type="Text" />
</Fields>
<Views>
--Removed--
</Views>
<Forms>
<Form Type="DisplayForm" SetupPath="pages\form.aspx" Url="Forms/DispForm.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" SetupPath="pages\form.aspx" Url="Forms/EditForm.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main" />
--Removed--
</Forms>
</MetaData>
</List>

When you upload a document in a Document Library there's an option for you to choose the Content Type, choose your custom Content Type and you'll see the fields you defined.

Related

Sum function not working when selecting value after matching condition

I'm trying to extract and sum values from a XML file. The data set have an element called "Pallets" which contains "Y" or "N". So if the "Pallets" value equals "Y" then I want to get the value in "Amount". I went through lot of XSL codes here and on the internet then I came up with the below code part.
<xsl:value-of select=
"('
Pallet Amount',
$fullPath/LineItemRows/LineItemRow/Fields
[Field[#Label = 'Pallets']/Value = 'Y']
/sum(number(translate(Field[#Label = 'Amount']/Value,
',',
'.')
)
)
)"/>
Which is producing the below out put,
Pallet Amount 7.21 7.21 14.06
As you guys can see I do get the values but they're not summing up. My desired out put is 28.48.
Below is a sample set of data which is similar to the XML I'm using (the actual file is too big and it generated by a software we use).
<LineItemRows>
<LineItemRow ID="0" FromPage="1">
<Fields>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>406,74</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="3" FromPage="1">
<Fields>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>Y</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>7,21</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="0" FromPage="1">
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>33,92</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="5" FromPage="1">
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>Y</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>7,21</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="6" FromPage="1">
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>Y</Value>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>14,06</Value>
</Field>
</Fields>
</LineItemRow>
</LinItemRows>
I also tried some other ways but those literally didn't work. Hope I made my question clear. Also I'm using xsl version 2.0 but system is compatible with version 1.0 as well.
The XPath 2 expression
sum(LineItemRows/LineItemRow/Fields[Field[#Label='Pallets' and Value='Y']]/Field[#Label='Amount']/xs:decimal(translate(Value,',','.')))
If there is any risk that the Y or N value could be padded with whitespace then use normalize-space(Value)='Y' for that value test.
Your original expression was applying the summing within the LineItemRow which would only have found a single value and so you were outputting a sequence of those single-value sums.
The expression here also performs the sum using the XMLSchema Decimal type (declare the namespace xmlns:xs="http://www.w3.org/2001/XMLSchema" for the prefix used in that expression) rather than the default double precision number representation which should avoid inaccuracies and the need to round the sums to two digits.

Group data when condition is met

I'm working on a XSL solution to convert a XML file to CSV. The end product need me to read set of invoices from the XML and then group them according to the invoice number and then list the items below the invoice number.
I'm not a fluent in XSL but I wrote the entire thing but I'm stuck on creating the tables. Below is the out put I'm required to create.
I tried to find away to make it work but only way I came close with this posts second answer. Following that I came up with the below code. Also like to mention I'm using XSL v 2.0
<!-- Line items -->
<!-- Full path for the elemnts I'm just lazy to tye the same thing again and again -->
<xsl:variable name="fullPath" select="/BatchObject/BaseTypeContainerList/BaseTypeContainer/BaseTypeObject/Metadata"/>
<!-- Full path for line items. I'm just too lazy -->
<xsl:variable name="fullPathLine" select="/BatchObject/BaseTypeContainerList/BaseTypeContainer/BaseTypeObject/Metadata/LineItemRows/LineItemRow"/>
<xsl:for-each-group select="$fullPath" group-by="$fullPath/Fields/Field[#Label = 'Invoice Number']/Value" >
<xsl:text>
</xsl:text>
<xsl:value-of select="current-grouping-key()"/>
<xsl:text>
</xsl:text>
<xsl:for-each select="$fullPath/Fields/Field[#Label = 'Invoice Number']/Value = current-grouping-key()">
<xsl:value-of select="('
',$fullPathLine/Fields/Field[#Label = 'Line']/Value,';')"/>
<xsl:value-of select="($fullPathLine/Fields/Field[#Label = 'Description']/Value,';')"/>
<xsl:text>
</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:for-each-group>
But the out put is looks like this,
01108840
1 2 3 4 1 2 3 4 5 6 7 1 2 3 4 5 6 ;Ekstra lang Høy skillevegg, ekstra Gummimatte, ekstra Pallet 1200x800 Hylle 1458x216x54 Hylle 1296x216x54 Forhøyningsramme med Bakdeksel 486x270 Bakdeksel 648x378 Pallet 1200x800 Pallet frame 1200X800 Skuff 486x486x216 Hylle 486x486x54 Hyllestige med kortere Verktøyplate 486x270 Bakdeksel 486x270 Gummimatte, hylle ;
01108849
1 2 3 4 1 2 3 4 5 6 7 1 2 3 4 5 6 ;Ekstra lang Høy skillevegg, ekstra Gummimatte, ekstra Pallet 1200x800 Hylle 1458x216x54 Hylle 1296x216x54 Forhøyningsramme med Bakdeksel 486x270 Bakdeksel 648x378 Pallet 1200x800 Pallet frame 1200X800 Skuff 486x486x216 Hylle 486x486x54 Hyllestige med kortere Verktøyplate 486x270 Bakdeksel 486x270 Gummimatte, hylle ;
But out put I want to create is
01108840
1;Ekstra lang Høy
2;skillevegg,
3;ekstra Gummimatte,
4;ekstra Pallet 1200x800
XML data sheet.
<BaseTypeContainerList>
<BaseTypeContainer ID="2292be4cbac2405097d8b40fdbe0068b" DBID="0" Archived="0001-01-01T00:00:00" Destroy="0001-01-01T00:00:00" Created="2020-03-31T12:12:00.2302687+02:00" Modified="2020-03-31T12:12:00.2302687+02:00" CreatedOrder="0" Status="Complete" RejectionMailSendt="false">
<BaseTypeObject xsi:type="Email" ID="5885e93bfc8e404187bc274417ee4ac5">
<Metadata>
<Fields>
<Field ID="186e155a1fb6442b872a88dc5f6e8a7f" Type="Text" Status="Complete" Label="Master">
<Value>KGH_Modulsystem</Value>
</Field>
<Field ID="4911c6aa66864547b5e81ae92e1241af" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Agreement Number">
<Value>130</Value>
</Field>
<Field ID="6941c04028f149b4b48cd3eb659bb71d" Type="Text" Status="Complete" Label="Seller">
<Value>112885</Value>
</Field>
<Field ID="90236e52a3194885b4812e4d84afda76" Type="Text" Status="Complete" Label="Buyer">
<Value>Modul-System AS</Value>
</Field>
<Field ID="c03844760c5342caab89253570eb6af9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Customer Number">
<Value>9095</Value>
</Field>
<Field ID="510fe5c44e1d4e9d8499a83cfae92802" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Number">
<Value>01108840</Value>
</Field>
<Field ID="d34638d12dd64e519bbb5da0b92d1f0b" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Date" Status="Complete" Label="Invoice Date">
<Value>28.11.2019</Value>
</Field>
<Field ID="c121fadca3d34278a68aa2feb26fc969" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Type">
<Value>CI</Value>
</Field>
<Field ID="2d489e9bb66b49559ee634e140df33b0" MappedFieldID="d9f08184ff57469cb9bb37fa28014249" Type="Text" Status="Complete" Label="Delivery Term">
<Value>DDP</Value>
</Field>
<Field ID="ee9cd176f29245b0978de6d0706dc478" Type="Text" Status="Complete" Label="Delivery Term Location">
<Value>Skjetten</Value>
</Field>
<Field ID="6c23fea43499495590efebb0b4cea541" Type="Text" Status="Complete" Label="Packages">
<Value>1</Value>
</Field>
<Field ID="66fdcc37d3ae4eafa21523a7ec1937d9" Type="Text" Status="Complete" Label="Package Type">
<Value>PX</Value>
</Field>
<Field ID="e6d8303294a8400e933ee622196dbcc3" Type="Text" Status="Complete" Label="Pallet Weight">
<Value>23</Value>
</Field>
<Field ID="a4548889d35d44159c1f19d55017412f" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Gross Weight">
<Value>3000</Value>
</Field>
<Field ID="05ce757f80a14c1182c59f070be06522" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Net Weight">
<Value>2500</Value>
</Field>
<Field ID="fce2f65786314fc2ae466639b8c4a7f9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Over-Head Cost">
<Value>45,22</Value>
</Field>
<Field ID="160f608391854226a6e3fc3d363a5490" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Total Amount">
<Value>452,23</Value>
</Field>
<Field ID="0cd4d1027d9d44b490e306f0e04e36e6" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Currency">
<Value>EUR</Value>
</Field>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line" />
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity" />
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description" />
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number" />
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin" />
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount" />
<Field ID="bc54c6e2147949899ed875c189753846" Type="Text" Status="Complete" Label="Table Amount">
<Value>452,23</Value>
</Field>
<Field ID="e182f943a4694123b7f7182b2b017fca" Type="Text" Status="Complete" Label="Country Sender Receiver">
<Value>SE;NO</Value>
</Field>
<Field ID="e3136a0631c346149a3cfd48e7824f85" MappedFieldID="ce76fa9ee7c74b1aa4367e2eac8de23b" Type="Text" Status="Complete" Label="Email">
<Value>stian.svarholt#kghcustoms.com</Value>
</Field>
</Fields>
<LineItemRows>
<LineItemRow ID="0" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>1</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Ekstra lang</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>406,74</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="1" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>2</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>2,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Høy skillevegg, ekstra</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>24,90</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="2" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>3</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>3,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Gummimatte, ekstra</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>13,38</Value>
</Field>
</Fields>
</LineItemRow>
</LineItemRows>
<BaseTypeContainer ID="1320da9c026b4b6ead49f7a736676570" DBID="0" Archived="0001-01-01T00:00:00" Destroy="0001-01-01T00:00:00" Created="2020-03-31T12:12:01.9314102+02:00" Modified="2020-03-31T12:12:01.9314102+02:00" CreatedOrder="1" Status="Complete" RejectionMailSendt="false">
<BaseTypeObject xsi:type="Email" ID="b77a7d029687426cb9e60d017df5bb58">
<Metadata>
<Fields>
<Field ID="186e155a1fb6442b872a88dc5f6e8a7f" Type="Text" Status="Complete" Label="Master">
<Value>KGH_Modulsystem</Value>
</Field>
<Field ID="4911c6aa66864547b5e81ae92e1241af" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Agreement Number">
<Value>130</Value>
</Field>
<Field ID="6941c04028f149b4b48cd3eb659bb71d" Type="Text" Status="Complete" Label="Seller">
<Value>112885</Value>
</Field>
<Field ID="90236e52a3194885b4812e4d84afda76" Type="Text" Status="Complete" Label="Buyer">
<Value>Modul-System AS</Value>
</Field>
<Field ID="c03844760c5342caab89253570eb6af9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Customer Number">
<Value>9095</Value>
</Field>
<Field ID="510fe5c44e1d4e9d8499a83cfae92802" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Number">
<Value>01108849</Value>
</Field>
<Field ID="d34638d12dd64e519bbb5da0b92d1f0b" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Date" Status="Complete" Label="Invoice Date">
<Value>28.11.2019</Value>
</Field>
<Field ID="c121fadca3d34278a68aa2feb26fc969" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Type">
<Value>CI</Value>
</Field>
<Field ID="2d489e9bb66b49559ee634e140df33b0" MappedFieldID="d9f08184ff57469cb9bb37fa28014249" Type="Text" Status="Complete" Label="Delivery Term">
<Value>DDP</Value>
</Field>
<Field ID="ee9cd176f29245b0978de6d0706dc478" Type="Text" Status="Complete" Label="Delivery Term Location">
<Value>Skjetten</Value>
</Field>
<Field ID="6c23fea43499495590efebb0b4cea541" Type="Text" Status="Complete" Label="Packages">
<Value>3</Value>
</Field>
<Field ID="66fdcc37d3ae4eafa21523a7ec1937d9" Type="Text" Status="Complete" Label="Package Type">
<Value>PX</Value>
</Field>
<Field ID="e6d8303294a8400e933ee622196dbcc3" Type="Text" Status="Complete" Label="Pallet Weight">
<Value>23</Value>
</Field>
<Field ID="a4548889d35d44159c1f19d55017412f" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Gross Weight">
<Value>3000</Value>
</Field>
<Field ID="05ce757f80a14c1182c59f070be06522" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Net Weight">
<Value>2500</Value>
</Field>
<Field ID="fce2f65786314fc2ae466639b8c4a7f9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Over-Head Cost">
<Value>19,27</Value>
</Field>
<Field ID="160f608391854226a6e3fc3d363a5490" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Total Amount">
<Value>192,72</Value>
</Field>
<Field ID="0cd4d1027d9d44b490e306f0e04e36e6" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Currency">
<Value>EUR</Value>
</Field>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line" />
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity" />
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description" />
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number" />
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin" />
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount" />
<Field ID="bc54c6e2147949899ed875c189753846" Type="Text" Status="Complete" Label="Table Amount">
<Value>192,72</Value>
</Field>
<Field ID="e182f943a4694123b7f7182b2b017fca" Type="Text" Status="Complete" Label="Country Sender Receiver">
<Value>SE;NO</Value>
</Field>
<Field ID="e3136a0631c346149a3cfd48e7824f85" MappedFieldID="ce76fa9ee7c74b1aa4367e2eac8de23b" Type="Text" Status="Complete" Label="Email">
<Value>stian.svarholt#kghcustoms.com</Value>
</Field>
</Fields>
<LineItemRows>
<LineItemRow ID="0" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>1</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Hylle 1458x216x54</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>33,92</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="1" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>2</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Hylle 1296x216x54</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>33,44</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="2" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>3</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Forhøyningsramme med</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>19,20</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="3" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>4</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>2,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Bakdeksel 486x270</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>31,82</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="4" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>5</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>3,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Bakdeksel 648x378</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>53,07</Value>
</Field>
</Fields>
</LineItemRow>
</LineItemRows>
I know the data set is big but wanted show you what I've to work with. So hope some can shed some light on what I'm doing wrong.
I think instead of
<xsl:for-each select="$fullPath/Fields/Field[#Label = 'Invoice Number']/Value = current-grouping-key()">
you want
<xsl:for-each select="current-group()">

Quickfix MarketDataIncrementalRefresh: Tag not defined for this message type

I use Quickfix c++.
I receive FIX message from the server:
8=FIX.4.2|9=312|35=X|34=17|49=CX|52=20150413-13:33:39.691|56=CACIB_MD2|262=1|9883=IDB|268=2|279=2|269=0|55=535791|270=15|271=1|272=20150413|273=13:28:07.653|59=0|126=20150413-21:56:46.201|290=1|9139=cacib_uat2|279=0|269=0|55=535791|270=17|271=1|272=20150413|273=13:33:39.660|59=0|126=20150413-21:56:46.201|290=1|9139=cacib_uat2|10=015|
and Quickfix automatically sends back to the server reject message (tag 55 not defined for this message type):
8=FIX.4.2|9=121|35=3|34=17|49=CACIB_MD2|52=20150413-13:33:39.755|56=CX|45=17|58=Tag not defined for this message type|371=55|372=X|373=2|10=044|
But this tag (55) is defined in the dictionary file:
<message name='MarketDataIncrementalRefresh' msgcat='app' msgtype='X'>
<field name='MDReqID' required='N' />
<field name='CXMarketType' required='N' />
<group name='NoMDEntries' required='N'>
<field name='Symbol' required='N' />
</group>
</message>
...
<field number='55' name='Symbol' type='STRING' />
...
<field number='262' name='MDReqID' type='STRING' />
...
<field number='268' name='NoMDEntries' type='INT' />
...
<field number='9883' name='CXMarketType' type='STRING' />
...
And FIX options are:
UseDataDictionary=Y
DataDictionary=./conf/fix42_dictionary.xml
ValidateFieldsOutOfOrder=N
ValidateUserDefinedFields=N
I don't understand why Quickfix decides that tag 55 (symbol) is not defined, when it is part of the group.
Can you please help?
Problem is you can't directly add groups to messages, it should be inside a component first
<message name='MarketDataIncrementalRefresh' msgcat='app' msgtype='X'>
<field name='MDReqID' required='N' />
<field name='CXMarketType' required='N' />
<component name='NoMDEntriesComp' required='N' />
</message>
<component name="NoMDEntriesComp">
<group name='NoMDEntries' required='N'>
<field name='Symbol' required='N' />
</group>
</component>
NoMDEntries type should be NUMINGROUP instead of INT
<field number='268' name='NoMDEntries' type='NUMINGROUP' />
I faced same issue.It is QuickFix incorrect reporting of the error. It is necessary to define the user defined fields in the FIX4?.xml. Define the fields in the section and add them to the appropriate message as well.In your case 9883 is look like custom tag you have declared it but not defined in 35=X message properly. So if you use this custom tag in 35=X message inside NoMDEntries can solve your problem.
<message name='MarketDataIncrementalRefresh' msgcat='app' msgtype='X'>
<field name='MDReqID' required='N' />
<group name='NoMDEntries' required='N'>
<field name='Symbol' required='N' />
<field name='CXMarketType' required='N' />
</group>
</message>

flow in model-glue event handler

Can any body help me to understand the flow of model-glue event handler......its so confusing or simplify bellow code......
<event-handler name="Shipment.List" type="templatedPage">
<broadcasts>
<message name="needShipmentList" />
</broadcasts>
<views>
<include name="Primary" template="List.Shipment.cfm">
<value name="xe_Display" value="Shipment.Display" />
<value name="xe_Form" value="Shipment.Form" />
</include>
</views>
</event-handler>
<event-handler name="Shipment.Display" type="templatedPage">
<broadcasts>
<message name="needShipmentDetail" />
</broadcasts>
<views>
<include name="primary" template="Display.Shipment.cfm">
<value name="xe_ShipmentList" value="Shipment.List" />
<value name="xe_ItemForm" value="Item.Form" />
<value name="xe_ShipmentDisplay" value="Shipment.Display" />
<value name="xe_ItemRemove" value="doItem.Remove" />
</include>
</views>
</event-handler>
When you call for event "Shipment.List", it will broadcasts "needShipmentList" function of ShipmentController, after execution it will return on List.Shipment.cfm from on "Primary" layout of master page.
"List.Shipment.cfm" has a link whicj is triggered for needShipmentDetail function
"List.Shipment.cfm" fatches values from "Shipment.Display"-->needShipmentDetail
on display page(Display.Shipment.cfm), there are some links for remove, for listing...etc
"xe" is a convention for eXit Events

indexing all documents in doc folder in to solr FileListEntityProcessor

http://wiki.apache.org/solr/ExtractingRequestHandler does not provide much information how to configure this handler in an webapplication which has its own context and want to use solr as server features as embebdedd solr .
Can you please provide some information on how to upload the documents to solr and search for some content from those documents?
I have configured DIH as in solrConf.xml
<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">tika-data-config.xml</str>
</lst>
</requestHandler>
and tika-data-config.xml looks like
<dataConfig>
<dataSource type="BinFileDataSource" name="bin" />
<document>
<entity name="sd"
processor="FileListEntityProcessor"
newerThan="'NOW-30DAYS'"
filenName=".*\.(DOC)|(PDF)|(pdf)|(doc)|(docx)|(ppt)"
baseDir="G:/workspace/FacetedSearch/src/solr/docs"
recursive="true"
rootEntity="false"
>
<field column="fileAbsolutePath" name="path" />
<field column="fileSize" name="size" />
<field column="fileLastModified" name="lastmodified" />
<field column="fileAbsolutePath" name="text" />
<!-- <field column="fileName" name="text" /> -->
<field column="baseDir" name="text" />
<!-- <entity name="tika-test" processor="TikaEntityProcessor"
url="${sd.fileAbsolutePath}" format="text" dataSource="bin">
-->
<entity name="tika-test"
dataSource="bin"
processor="TikaEntityProcessor"
url="G:/workspace/FacetedSearch/src/solr/docs"
format="text" >
<field column="Author" name="author" meta="true"/>
<field column="Content-Type" name="title" meta="true"/>
<field column="title" name="title" meta="true"/>
<field column="text" name="text"/>
</entity>
</entity>
</document>
</dataConfig>
the dir G:/workspace/FacetedSearch/src/solr/docs contains many pdf and html files
some of them are tutorial.pdf......index.pdf
after this configuration when i build solrQuery object as
CoreContainer.Initializer initializer = new CoreContainer.Initializer();
CoreContainer coreContainer = initializer.initialize();
EmbeddedSolrServer solrServer = new EmbeddedSolrServer(coreContainer, "");
SolrQuery solrQuery = new SolrQuery();
solrQuery.addField("literal.id");
solrQuery.setQuery("index.pdf");
QueryResponse queryResponse = null ;
try{
queryResponse = (QueryResponse) solrServer.query(solrQuery);
}catch(Exception e){
System.out.println("exception occured while processing the solrQuery "+
e.getMessage() +"stack trace " + e + solrQuery.toString());
}
out.println(queryResponse);
i do not get any result (here queryResponse is null).
I have the schema.xml distributed by solr 3.5 and added some fields as
<field name="path" type="text_general" indexed="true" stored="true" />
<field name="lastmodified" type="date" indexed="true" stored="true" />
I have question like are the documents in "G:/workspace/FacetedSearch/src/solr/docs"
will be indexed by solr on solr startup?
If these are indexed how can i get the result?
Can any one please let me know where i am doing wrong?
Please let me know if any more information needed from me in getting my answeres.