entity-find with select-field gives error msg - moqui

when run the following code :
<entity-find entity-name="mantle.order.OrderHeaderPartFacilityStatus" list="orderPartList">
<econdition field-name="facilityId" from = "facilityId"/>
<econdition field-name="statusId" operator="in" value="OrderPlaced,"/>
<!-- <select-field field-name="orderId, "/> -->
<!-- <select-field field-name="orderName"/> -->
<!-- <select-field field-name="placedDate"/> -->
<!-- <select-field field-name="grandTotal"/> -->
<!-- <select-field field-name="orderPartSeqId"/> -->
<!-- <select-field field-name="facilityId"/> -->
<!-- <select-field field-name="facilityName"/> -->
<!-- <select-field field-name="partStatusId"/> -->
<!-- <order-by field-name="orderPartSeqId"/> -->
</entity-find>
I got:
"orderPartList": [
{
"enteredByPartyId": null,
"salesChannelEnumId": null,
"recurrenceInfoId": null,
"customerRoleTypeId": "Manager",
"billingAccountId": null,
"placedDate": "2016-01-01T00:00:00+0000",
"telecomContactMechId": null,
"postalContactMechId": null,
"vendorRoleTypeId": null,
"visitId": null,
"lastOrderedDate": null,
"remainingSubTotal": null,
"trackingNumber": null,
"otherPartyOrderId": null,
"statusId": "OrderPlaced",
"giftMessage": null,
"entryDate": null,
"shippingInstructions": null,
"autoCancelDate": null,
"estimatedDeliveryDate": null,
"customerPartyId": "EX_JOHN_DOE",
"validThruDate": null,
"carrierPartyId": null,
"partTotal": 5.1E+2,
"facilityId": "FWorkshopnanneihuan",
"syncStatusId": null,
"estimatedShipDate": null,
"validFromDate": null,
"estimatedPickUpDate": null,
"externalRevision": null,
"orderPartSeqId": "01",
"terminalId": null,
"shipmentMethodEnumId": null,
"shipBeforeDate": null,
"parentOrderId": null,
"isGift": null,
"productStoreId": null,
"orderRevision": 26,
"dontCancelSetDate": null,
"pseudoId": "FWorkshopnanneihuan",
"dontCancelSetUserId": null,
"systemMessageRemoteId": null,
"maySplit": null,
"externalId": null,
"parentPartSeqId": null,
"facilityName": "\u5357\u5185\u73af\u8f66\u95f4",
"orderId": "FOJohndoePassat",
"vendorPartyId": null,
"shipAfterDate": null,
"currencyUomId": null,
"orderName": "John_doe order 1",
"grandTotal": 5.1E+2,
"partStatusId": "OrderOpen",
"partName": "\u7b2c\u4e00\u90e8\u5206 John doe",
"statusDescription": "Placed"
}
],
But when I uncommented the select-field tag, as the following:
<entity-find entity-name="mantle.order.OrderHeaderPartFacilityStatus" list="orderPartList">
<econdition field-name="facilityId" from = "facilityId"/>
<econdition field-name="statusId" operator="in" value="OrderPlaced,"/>
<select-field field-name="orderId, "/>
<!-- <select-field field-name="orderName"/> -->
<!-- <select-field field-name="placedDate"/> -->
<!-- <select-field field-name="grandTotal"/> -->
<!-- <select-field field-name="orderPartSeqId"/> -->
<!-- <select-field field-name="facilityId"/> -->
<!-- <select-field field-name="facilityName"/> -->
<!-- <select-field field-name="partStatusId"/> -->
<!-- <order-by field-name="orderPartSeqId"/> -->
</entity-find>
I then got the following error msg, which might suggest that the select sql not working:
{"errorCode":500,"errors":"java.lang.IllegalArgumentException: Maps with null keys can't be converted to JSON"}
Something wrong?
I am runing MoquiDemo-2.0.0 with customized data.
It might be a bug or something? Someone has clue?

The field-name "orderId, " is not valid. The comma is used to separate multiple field names so it turns that into a list of "orderId" and "", and an empty string is not a valid field name.
Similarly in your econdition on statusId the #value attribute has a comma at the end. If you are trying to include records with a null statusId use the econdition.#or-null attribute. For a more efficient query if that isn't what you are looking for, get rid of the comma and use the equals operator (which is the default so you don't need the operator attribute).
In general this code is sloppy. Moqui tries to be tolerant of funny things and do its best, but invalid field names and such are still invalid and you'll get errors. You may have more errors or warnings in the server side log as well, that is usually the first place to look if something isn't working right.

Related

Using SELECT within Trigger

A customer needs a trigger for his new management tool. It works so far, but now he wants to get values from another table.
What does it mean? Take a short look at the (working) trigger:
CREATE OR REPLACE TRIGGER reldb_export_T_Import3_In
AFTER UPDATE OR INSERT OR DELETE ON infor.RELDB
FOR EACH ROW
DECLARE KST varchar(1000 BYTE);
BEGIN
IF (:new.ZUST = 4 AND :old.ZUST = 3 AND :old.SAINT = 60)
THEN
INSERT INTO infor2infoboard.T_Import3_In
(Idx, Timestamp, ObjectId, Text, RowUid, GroupName, GroupIndex, PredTimeCondition, PredGapValue, Service, ReqQuan, ReqDur,
Efficiency, BackColor, HighlightColor, Brightness, CellOffsetY, Fixed, Font, FontColor, Height, EarliestStart, LastDeliveryDate, RoleId,
StatusIds, WithReservation, LastChange, LastEditedBy, Opacity, IsProcess, CheckSymbol, Link, Priority, IconPath, Adress, CA1, CA2,
CA3, CA4, CA5, CA6, CA7, CA8, CA9, CA10, CA11, CA12, CA13, CA14, CA15,
CA16, CA17, CA18, CA19, CA20, CA21, CA22, CA23, CA24, CA25,
CA26, CA27, CA28, CA29, CA30, CA31, CA32)
VALUES
(seq_t_import3_in.nextval, sysdate, :old.RNR, NULL, CASE WHEN :NEW.KST = '3710' THEN 'Pool TB-M 1;Pool TB-M 2;Pool TB-M 3;Pool TB-M 4;Pool TB-M 5' ELSE KST END, :old.Komm, NULL, NULL, NULL, :old.KTXT, :old.TA_4, NULL,
NULL, CASE WHEN :new.MNR = '3740' THEN 'GREEN' WHEN :new.MNR != '3740' THEN 'BLUE' END, NULL, NULL, NULL, NULL, NULL, NULL, NULL, :old.TERM_2, :old.TERM_1, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, SUBSTR(:old.ANR, 1, 10), :old.KOMM, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL);
END IF;......
Now he want to replace one of the last NULLS with a selected value.
The statement should look like this:
SELECT KTXT FROM RELDB WHERE ANR = :old.ANR and SAEXT = 'H';
So, for example:
NULL, (SELECT KTXT FROM RELDB WHERE ANR = :old.ANR and SAEXT = 'H';), SUBSTR(:old.ANR, 1, 10), :old.KOMM, NULL
My problem: I'm getting an error, that the trigger couldn't notice some changes. The trigger won't get fired.
So does anyone know how I can use or how I can get selected values (from the same (!!!) table which the trigger is listening to?
I'd appreciate your help :)
Cheers,
Dom
In Oracle, you cannot select from the same table you are changing, this is the mutating table error. See https://asktom.oracle.com/pls/apex/f?p=100:11:0::::p11_question_id:9579487119866

Enrich XML document via stored procedure

Our middleware software receives an XML document and forwards it to another software. However, there is one field in the target software (ext_text_10), that I do NOT want to overwrite.
Upon receiving the XML, I would like to call a stored proc, that should query the target database table to find the current ext_text_10 value, and insert a new element in the incoming XML with the resulting value, and then pass it on. This way we will simply pass the current value for that field.
The procedure below is reading the XML, building it again by preserving everything from it, and then inserting one element.
However, it does not return any result. Below is my procedure, and my source XML.
I hope somebody can tell me what is wrong. This is SQL Server 2016.
CREATE PROCEDURE [dbo].[z_ION_GetCurrentCostCenterData] (#xmlData xml)
AS
BEGIN
-- Prevent extra result sets from interfering with SELECT statements
SET NOCOUNT ON;
-- Parse XML
DECLARE #parsedXmlData int;
EXEC sp_xml_preparedocument #parsedXmlData OUTPUT, #xmlData;
DECLARE
#tenantID varchar(50),
#acc_entity varchar(3),
#doc_id varchar(50),
#anl_code varchar(15),
#anl_dim_id varchar(2),
#lookup_code varchar(15),
#anl_code_name varchar(50),
#prohibit_posting varchar(1),
#statusCode varchar(1),
#anl_cat_id varchar(15),
#ext_text_6 varchar(50),
#ext_text_7 varchar(50),
#ext_text_8 varchar(50),
#ext_text_9 varchar(50),
#ext_num_1 varchar(50),
#ext_num_2 varchar(50),
#ext_num_3 varchar(50),
#ext_num_4 varchar(50),
#ext_num_5 varchar(50),
#ext_date_1 varchar(50),
#ext_date_2 varchar(50),
#ext_fixed_1 varchar(50),
#ext_fixed_2 varchar(50),
#ext_fixed_3 varchar(50),
#TableName NVarchar(255)
--Get data from XML
select
#tenantID = tenantID,
#acc_entity = acc_entity,
#doc_id = doc_id,
#anl_code = anl_code,
#anl_dim_id = anl_dim_id,
#lookup_code = lookup_code,
#anl_code_name = anl_code_name,
#prohibit_posting = prohibit_posting,
#statusCode = statusCode,
#anl_cat_id = anl_cat_id,
#ext_text_6 = ext_text_6,
#ext_text_7 = ext_text_7,
#ext_text_8 = ext_text_8,
#ext_text_9 = ext_text_9,
#ext_num_1 = ext_num_1,
#ext_num_2 = ext_num_2,
#ext_num_3 = ext_num_3,
#ext_num_4 = ext_num_4,
#ext_num_5 = ext_num_5,
#ext_date_1 = ext_date_1,
#ext_date_2 = ext_date_2,
#ext_fixed_1 = ext_fixed_1,
#ext_fixed_2 = ext_fixed_2,
#ext_fixed_3 = ext_fixed_3
from OPENXML (#parsedXmlData,'DataArea',2)
with
(tenantID varchar(50) 'Sync/TenantID',
acc_entity varchar(3) 'Sync/AccountingEntityID',
doc_id varchar(50) 'SunSystemsAnalysisCodes/DocumentID/ID',
anl_code varchar(15) 'SunSystemsAnalysisCodes/AnalysisCode',
anl_dim_id varchar(2) 'SunSystemsAnalysisCodes/AnalysisDimensionId',
lookup_code varchar(15) 'SunSystemsAnalysisCodes/LookupCode',
anl_code_name varchar(50) 'SunSystemsAnalysisCodes/Name',
prohibit_posting varchar(1) 'SunSystemsAnalysisCodes/ProhibitPosting',
statusCode varchar(1) 'SunSystemsAnalysisCodes/Status',
anl_cat_id varchar(15) 'SunSystemsAnalysisCodes/AnalysisCatID/AnlCat_SHead',
ext_text_6 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionText6',
ext_text_7 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionText7',
ext_text_8 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionText8',
ext_text_9 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionText9',
ext_num_1 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionNumber1',
ext_num_2 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionNumber2',
ext_num_3 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionNumber3',
ext_num_4 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionNumber4',
ext_num_5 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionNumber5',
ext_date_1 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionDate1',
ext_date_2 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionDate2',
ext_fixed_1 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionFixed1',
ext_fixed_2 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionFixed2',
ext_fixed_3 varchar(50) 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionFixed3'
);
--Create XML to return
select
[EXT_TEXT_10] as 'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionText10'
from [dbo].[IMT_ANL_CODE_EXT]
where [ANL_CAT_ID] = #anl_cat_id and [ANL_CODE] = #anl_code
for XML PATH ('SunSystemsAnalysisCodes'), root('DataArea')
EXEC sp_xml_removedocument #parsedXmlData
END
Source XML:
<DataArea xmlns:my="http://schema.infor.com/InforOAGIS/2">
<Sync>
<TenantID>INFRA_TRN</TenantID>
<AccountingEntityID>IMT</AccountingEntityID>
<ActionCriteria>
<ActionExpression actionCode="Change" />
</ActionCriteria>
</Sync>
<SunSystemsAnalysisCodes>
<DocumentID>
<ID variationID="1495808583000">PRO 00002</ID>
</DocumentID>
<IONStatus>
<Code listID="GenericStatus">Open</Code>
</IONStatus>
<AnalysisCode>PRO17</AnalysisCode>
<AnalysisDimensionId>01</AnalysisDimensionId>
<LookupCode>Informatiesyste</LookupCode>
<Name>Informatiesysteem Relatics 10</Name>
<ProhibitPosting>0</ProhibitPosting>
<Status>0</Status>
<AnalysisCatID>
<AnlCat_SHead>COST CENTRE</AnlCat_SHead>
</AnalysisCatID>
<ExtendedAnalysis>
<ExtensionText6>SVE</ExtensionText6>
<ExtensionText7>Open</ExtensionText7>
<ExtensionText8 />
<ExtensionNumber1>81700</ExtensionNumber1>
<ExtensionNumber2 />
<ExtensionNumber3 />
<ExtensionNumber4 />
<ExtensionNumber5 />
<ExtensionDate1>01012016</ExtensionDate1>
<ExtensionDate2>31122016</ExtensionDate2>
<ExtensionFixed1>1</ExtensionFixed1>
<ExtensionFixed2>2</ExtensionFixed2>
<ExtensionFixed3>2</ExtensionFixed3>
</ExtendedAnalysis>
</SunSystemsAnalysisCodes>
</DataArea>
If this doesn't help you, please answer the questions from my comment below your question!
My magic crystall ball tells me, that you might be looking for something like this (shortened for brevity):
DECLARE #xml XML=
N'<DataArea xmlns:my="http://schema.infor.com/InforOAGIS/2">
<Sync>
<TenantID>INFRA_TRN</TenantID>
<!-- more elements -->
</Sync>
<SunSystemsAnalysisCodes>
<DocumentID>
<ID variationID="1495808583000">PRO 00002</ID>
</DocumentID>
<!-- more elements -->
<ExtendedAnalysis>
<ExtensionText6>SVE</ExtensionText6>
<ExtensionText7>Open</ExtensionText7>
<ExtensionText8 />
<ExtensionNumber1>81700</ExtensionNumber1>
<ExtensionNumber2 />
<ExtensionNumber3 />
<ExtensionNumber4 />
<ExtensionNumber5 />
<ExtensionDate1>01012016</ExtensionDate1>
<ExtensionDate2>31122016</ExtensionDate2>
<ExtensionFixed1>1</ExtensionFixed1>
<ExtensionFixed2>2</ExtensionFixed2>
<ExtensionFixed3>2</ExtensionFixed3>
</ExtendedAnalysis>
</SunSystemsAnalysisCodes>
</DataArea>';
--This is the content you want to introduce
DECLARE #ContentToAdd NVARCHAR(MAX)=N'SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionText10';
--This XML_DML-statement will insert your content with the given name before the <ExtensionNumber1> (which must exist! Other positions are possible of course)
SET #xml.modify(N'insert <ExtensionText10>{sql:variable("#ContentToAdd")}</ExtensionText10>
before (/DataArea/SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionNumber1)[1]');
--Check the output:
SELECT #xml;
<DataArea xmlns:my="http://schema.infor.com/InforOAGIS/2">
<Sync>
<TenantID>INFRA_TRN</TenantID>
<!-- more elements -->
</Sync>
<SunSystemsAnalysisCodes>
<DocumentID>
<ID variationID="1495808583000">PRO 00002</ID>
</DocumentID>
<!-- more elements -->
<ExtendedAnalysis>
<ExtensionText6>SVE</ExtensionText6>
<ExtensionText7>Open</ExtensionText7>
<ExtensionText8 />
<ExtensionText10>SunSystemsAnalysisCodes/ExtendedAnalysis/ExtensionText10</ExtensionText10>
<ExtensionNumber1>81700</ExtensionNumber1>
<ExtensionNumber2 />
<ExtensionNumber3 />
<ExtensionNumber4 />
<ExtensionNumber5 />
<ExtensionDate1>01012016</ExtensionDate1>
<ExtensionDate2>31122016</ExtensionDate2>
<ExtensionFixed1>1</ExtensionFixed1>
<ExtensionFixed2>2</ExtensionFixed2>
<ExtensionFixed3>2</ExtensionFixed3>
</ExtendedAnalysis>
</SunSystemsAnalysisCodes>
</DataArea>

PairSet repetition in ttf font GPOS table

I am reading ttf specification and realizing the parser. But I have encountered a problem of parsing 'GPOS' table.
This is the link to GPOS table specification: http://www.microsoft.com/typography/otspec/gpos.htm
It says:
ValueFormat2 applies to the ValueRecord of the second glyph in each pair. ValueRecords for all second glyphs must use ValueFormat2. If ValueFormat2 is set to null, then the second glyph of the pair is the “next” glyph for which a lookup should be performed.
My first question: What would happen when 'ValueFormat2' is 'null'? Is it the same with 'ValueFormat1'? If so, why the spec using different expressions?
Compared with the .ttx file generated by ttx, I find that there are repetitions of PairSet in GPOS section. But my parser couldn't read out such repetitions from ttf binary file. For example: times.ttf on Windows7. File 'time.ttx' has the following items, but my parser reads out 'index 13', then the next group is 'index 16', which means I have missed 'index 14' and 'index 15'. And I don't know why I cannot read out the same result as ttx does.
My second question: Is there anything I have missed from the ttf specification? Which and where are such repetitions explained? Thanks in advance!
<PairSet index="13">
<!-- PairValueCount=2 -->
<PairValueRecord index="0">
<SecondGlyph value="comma"/>
<Value1 XAdvance="-133"/>
</PairValueRecord>
<PairValueRecord index="1">
<SecondGlyph value="period"/>
<Value1 XAdvance="-133"/>
</PairValueRecord>
</PairSet>
<PairSet index="14">
<!-- PairValueCount=2 -->
<PairValueRecord index="0">
<SecondGlyph value="comma"/>
<Value1 XAdvance="-133"/>
</PairValueRecord>
<PairValueRecord index="1">
<SecondGlyph value="period"/>
<Value1 XAdvance="-133"/>
</PairValueRecord>
</PairSet>
<PairSet index="15">
<!-- PairValueCount=2 -->
<PairValueRecord index="0">
<SecondGlyph value="comma"/>
<Value1 XAdvance="-133"/>
</PairValueRecord>
<PairValueRecord index="1">
<SecondGlyph value="period"/>
<Value1 XAdvance="-133"/>
</PairValueRecord>
</PairSet>
<PairSet index="16">
<!-- PairValueCount=1 -->
<PairValueRecord index="0">
<SecondGlyph value="quoteleft"/>
<Value1 XAdvance="-152"/>
</PairValueRecord>
</PairSet>

SQL Server XML Date Import

Having trouble importing an xml date feild into sql server, the other feilds are fine. I have tried numerous way's but it always returns as null. Any help please
2014-02-18T12:15:21.357 is the issue
The XML is
<?xml version="1.0" encoding="utf-8"?>
<MISRoot xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IGUK.Evolution.FieldToolLite.Lib.MIS">
<Claims>
<Claim>
<Amalgamation>
<ChannelSolutions />
<Name i:nil="true" />
</Amalgamation>
<Appointments>
<Appointment>
<Access />
<AccessGranted>true</AccessGranted>
<AppointmentId>320</AppointmentId>
<EnterTime>2014-02-18T12:15:21.357</EnterTime>
<LeaveTime i:nil="true" />
<Name i:nil="true" />
</Appointment>
</Appointments>
<CustomProducts />
<Id>1220</Id>
<Payments />
<Tasks />
</Claim>
</Claims>
</MISRoot>
THE SQL is
CREATE TABLE [dbo].[xmlImportAppointments](
[ClaimId] [int] not null,
[AppointmentAUTO] [int] not NULL,
[AppointmentId] [int] not NULL,
[EnterTime] [datetime] NULL,
[LeaveTime] [datetime] NULL,
[AccessGranted] [nchar](20) NULL,
) ON [PRIMARY]
GO
WITH XMLNAMESPACES(DEFAULT 'http://schemas.datacontract.org/2004/07/IGUK.Evolution.FieldToolLite.Lib.MIS')
INSERT INTO xmlImportAppointments
(ClaimId, AppointmentAUTO, AppointmentId, EnterTime, LeaveTime, AccessGranted)
SELECT
ClaimId = xmldata.value('(Claim/Id)[1]', 'int'),
AppointmentAUTO = xmldata.value('(Claim/Appointments/Appointment/AppointmentId)[1]', 'int'),
AppointmentId = xmldata.value('(Claim/Appointments/Appointment/AppointmentId)[1]', 'int'),
EnterTime = xmldata.value('(Claims/Appointment/Appointments/EnterTime)[1]', 'datetime'),
LeaveTime = xmldata.value('(Claims/Appointment/Appointments/EnterTime)[1]', 'datetime'),
AccessGranted = xmldata.value('(Claim/Appointments/Appointment/AccessGranted)[1]', 'NCHAR(20)')
FROM
(SELECT CAST(x AS XML)
FROM OPENROWSET(BULK '\\XMLTest\increment.xml',
SINGLE_BLOB) AS T(x)) AS T(x)
CROSS APPLY
x.nodes('/MISRoot/Claims') AS X(xmldata);
SELECT * FROM xmlImportAppointments
You had a problem with your XQuery I had copied your File into a XML variable and was able to retrieve using the following query.
DECLARE #MyXMLVariable XML =
'<?xml version="1.0" encoding="utf-8"?>
<MISRoot xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IGUK.Evolution.FieldToolLite.Lib.MIS">
<Claims>
<Claim>
<Amalgamation>
<ChannelSolutions />
<Name i:nil="true" />
</Amalgamation>
<Appointments>
<Appointment>
<Access />
<AccessGranted>true</AccessGranted>
<AppointmentId>320</AppointmentId>
<EnterTime>2014-02-18T12:15:21.357</EnterTime>
<LeaveTime i:nil="true" />
<Name i:nil="true" />
</Appointment>
</Appointments>
<CustomProducts />
<Id>1220</Id>
<Payments />
<Tasks />
</Claim>
</Claims>
</MISRoot>';
WITH XMLNAMESPACES(DEFAULT 'http://schemas.datacontract.org/2004/07/IGUK.Evolution.FieldToolLite.Lib.MIS')
SELECT #MyXMLVariable.value('(MISRoot/Claims/Claim/Appointments/Appointment/EnterTime)[1]','DATETIME')
You did not specify the full correct path to EnterTime
'(MISRoot/Claims/Claim/Appointments/Appointment/EnterTime)[1]' --Correct
'(Claims/Appointment/Appointments/EnterTime)[1]' --Yours
Appointment is child of Appointments not the other way around and Claim is a child of Claims best way to do this is to look at Open tags and closed tags

Tick a “Pass Through” check box on the “Available Inputs Column” on a Fuzzy Lookup Transformation using BIML

I am using SQL Server 2008 BIDs / BIML, how do I tick the check box on the “Available Inputs Column” on the Columns tab of the Fuzzy Lookup Transformation Editor, column name is inputFile_id?
I do not won’t to match on this column just pass it through the FLT; simply tick the inputFile_id “Pass Through” checkbox on the columns tab of the Fuzzy Lookup Transformation Editor. Hopefully below a screenshot of the checkbox.
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections>
<OleDbConnection Name="SourceData" ConnectionString="Provider=SQLNCLI10;Server=myServer;Initial Catalog=myCat;Integrated Security=SSPI;" DelayValidation="true" />
</Connections>
<Packages>
<Package Name="_step01_CreateIndex" ConstraintMode="Linear">
<Tasks>
<Dataflow Name="My Dataflow Task">
<Transformations>
<OleDbSource Name="list of people to match to reference list" ConnectionName="SourceData">
<DirectInput>select TOP 1000 inputFile_id, forename, surname from dbo.peopleToMatchInputFile</DirectInput>
</OleDbSource>
<!-- Column names must be the same in dbo.peopleToMatchInputFile AND dbo.referenceListOfPeople. -->
<!-- A column from dbo.peopleToMatchInputFile MUST BE mapped to a column in dbo.referenceListOfPeople. -->
<FuzzyLookup Name="FLT - Generate new index"
MatchIndexOptions="GenerateAndPersistNewIndex"
MatchIndexName="dbo.referenceListOfPeopleINDEX"
ConnectionName="SourceData"
Exhaustive="false" >
<ExternalReferenceTableInput Table="dbo.referenceListOfPeople" />
<Inputs>
<Column SourceColumn="forename" TargetColumn="forename" MatchTypeExact ="false" MinSimilarity ="95" />
<Column SourceColumn="surname" TargetColumn="surname" MatchTypeExact="true" />
<Column SourceColumn="inputFile_id" TargetColumn="inputFile_id" PassThrough="true" IsUsed="false"/>
</Inputs>
<Outputs>
<Column SourceColumn="lookup_id" TargetColumn="lookup_id" />
<Column SourceColumn="forename" TargetColumn="OutputAlias_forename" />
<Column SourceColumn="surname" TargetColumn="surname" IsUsed="false" />
<Column SourceColumn="streetName" TargetColumn="streetName" />
<Column SourceColumn="dependantLocality" TargetColumn="dependantLocality" />
<Column SourceColumn="postalCounty" TargetColumn="postalCounty" />
<Column SourceColumn="postTown" TargetColumn="OutputAlias_postTown" />
</Outputs>
</FuzzyLookup>
</Transformations>
</Dataflow>
</Tasks>
</Package>
</Packages>
</Biml>
<## template language="C#" hostspecific="true"#>
<## import namespace="System.Data" #>
<## import namespace="Varigence.Hadron.CoreLowerer.SchemaManagement" #>
<!--
CREATE TABLE [dbo].[peopleToMatchInputFile](
[inputFile_id] [int] IDENTITY(1,1) NOT NULL,
[forename] [varchar](35) NOT NULL,
[surname] [varchar](35) NOT NULL,
[streetName] [varchar](80) NULL,
[batchNo] [int] NULL
)
CREATE TABLE [dbo].[referenceListOfPeople](
[lookup_id] [int] IDENTITY(1,1) NOT NULL,
[forename] [varchar](35) NOT NULL,
[surname] [varchar](35) NOT NULL,
[streetName] [varchar](80) NULL,
[dependantLocality] [varchar](35) NULL,
[postTown] [varchar](35) NULL,
[postalCounty] [varchar](35) NULL
)
-->