I want t make some validation rul that needs to do this
I have field EmplId and field Projid these fields have there own lookup on external datasources (xml files)
there is an adtional xml datasource that contains all accepted combinations of Emplid & Projid.
SO when the user selects his Emplid and next Projid, I want to validate that the combination is allowed.
I tryed this but it dit not work out: (validate rul on ProjId)
xdXDocument:GetDOM("ProjValEmplProjSetup")/ProjValEmplProjSetup/record[
EmplId[. = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/tns:createListProjHours/tns:ProjHours/tns:ProjJournalTrans/tns:EmplId] and
Projid[. = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/tns:createListProjHours/tns:ProjHours/tns:ProjJournalTrans/tns:ProjId]]/Projid
also this did not work out
xdXDocument:GetDOM("ProjValEmplProjSetup")/ProjValEmplProjSetup/record[
EmplId[. = current()/../tns:EmplId] and
Projid[. = current()]]/Projid
the xml database with PrijId en EmplId looks like this:
- <ProjValEmplProjSetup xmlns:ax="http://schemas.microsoft.com/dynamics/2006/02/documents/ProjValEmplProjSetup">
- <record>
<EmplId>AFE</EmplId>
<Projid>40010</Projid>
</record>
- <record>
<EmplId>BBL</EmplId>
<Projid>40010</Projid>
</record>
</ProjValEmplProjSetup>