XML/XPath Help needed to combine 2 simple statements - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

XML/XPath Help needed to combine 2 simple statements

Last post 04-08-2008 01:18 PM by Clay Fox. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-08-2008 08:30 AM

    XML/XPath Help needed to combine 2 simple statements

    I am trying to create a 2007 form which can be utilized by several languages.  I will try and give a simplified example.  But please remember I may have many countries, and many text fields all of which have this 'feature'.

    I have 3 fields  FormCountry, FormSite, FormTEXT
    I want to create a default for the field FormTEXT. But sometimes the value to go into FormText is dependent on the Country and the Site, and sometimes it is just dependent on the Country

    I have the following data from a secondary data source
    DataCountry     DataTEXT              DataSite
    England             Hi                         1
    England             Greetings              3
    England             Hello                     2
    Germany            Hello

    So the default value for FormTEXT is EITHER
    @DataText[@DataCountry = FormCountry and @DataSite = FormSite] 
    OR
    @DataText[@DataCountry = FormCountry]

    The 'decision' about which, is purely data driven.  If there is no value in DataSite then it is the second.  My xml/xpath is not up to combining these two simple statements without an IF clause can anyone help ?

    Thank you.

  • 04-08-2008 11:04 AM In reply to

    Re: XML/XPath Help needed to combine 2 simple statements

    Hi Catharine.

    We do many localized or multilanguage forms.

    Essentially we use an XML secondary source and then map all of the labels and buttons to pull their text from this source.  We have a dropdown that is used to specify which language source file to use.

    So all labels are done in Expression boxes.

    If you want to send me an email I could show you how we do it.

  • 04-08-2008 11:44 AM In reply to

    Re: XML/XPath Help needed to combine 2 simple statements

    Thank you  I would like to see  how you have done this.- I don't have an xml secondary data source - I have one from SharePoint.  I have a button which selects the language and then all of the text gets pulled in - and it works fine. 

    My difficulty is that in the same Field the value of the text is EITHER dependant on just one other field OR dependent on 2 other fields.  and I have no knowledge of which other than a value being missing from the secondary data.

    Catharine

  • 04-08-2008 01:18 PM In reply to

    Re: XML/XPath Help needed to combine 2 simple statements

    It could be done using a web based data source too.

    Send me an email and we can set up a demonstration.

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