validation trouble - InfoPath Dev
in

InfoPath Dev

validation trouble

Last post 04-20-2008 06:07 AM by wenni057. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-20-2008 06:07 AM

    • wenni057
    • Not Ranked
      Male
    • Joined on 03-25-2008
    • Netherlands
    • Posts 9

    validation trouble

    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>

     

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.