Adding a true/false value into secondary data source - InfoPath Dev
in

InfoPath Dev

Adding a true/false value into secondary data source

Last post 07-28-2009 08:45 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-10-2009 07:02 PM

    • nebock
    • Not Ranked
      Female
    • Joined on 03-06-2009
    • Indianapolis, IN
    • Posts 6

    Adding a true/false value into secondary data source

    I have a repeating table that I'm using a secondary data source to populate because I have 100s of entries for the table.  I have it set up in a handmade multi select box and need to concatenate all the boxes that are checked into a text box in a different view.  I got this to work using a formula with manual entries in the repeating table but doing it this way would take forever and so I'm thinking that I need to make a data source that will establish both the true/false checkbox AND the item to be selected, I have the items down, just not the true/false checkbox.  Any ideas?

     My data source is currently like this

    <?xml version="1.0" encoding="utf-8"?>
    <SelectedCompounds>
    <text value="compound1">compound1</text>
    <text value="compound2">compound2</text>

    It creates a data source like the following

    SelectedCompounds (group) / text (repeating field) / value

    And creates a table with two columns that are both populated with the same data, value and text, I want the value column, instead of matching the text column as it does not to be true/false checkboxes.  I've tried doing a 'changeto' and making them check boxes but I can't change the properties of the checkboxes (they say yes and no instead of true or false) and so the function I created to concatenate the repeating table filtered for true values isn't being populated.  I hope that made sense.

     

     

    -We're sitting in a cave at the end of the world, cooking and eating our friends.
  • 04-11-2009 07:49 AM In reply to

    Re: Adding a true/false value into secondary data source

    If you wanted the value attribute to have true/false values I have to wonder why you didn't put true/false values in the sample data.  Nonetheless, I admit that that probably wouldn't have helped in this situation.  You have two options here:

    1. Filter the rows using yes/no values instead of true/false values.
    2. Modify the secondary data source's schema to specify that the attribute should have a boolean value.

    The first option is considerably simpler, but I can explain how to do the latter if you are interested.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 04-11-2009 08:45 AM In reply to

    • nebock
    • Not Ranked
      Female
    • Joined on 03-06-2009
    • Indianapolis, IN
    • Posts 6

    Re: Adding a true/false value into secondary data source

     The latter was what I'm looking for actually.  I've tried filtering for yes values instead of true values and for some reason it's not populating the text box I need it to.  Although, I suppose that could have something to do with my formula.

    I didn't put the true/false values in the data source simply because I'm not 100% on how.  This is project got dropped on me and I have no experience with XML.

     

    Thanks

    -We're sitting in a cave at the end of the world, cooking and eating our friends.
  • 07-27-2009 11:47 PM In reply to

    Re: Adding a true/false value into secondary data source

     Was this ever solved?

    I'm looking for a similar  solution.

    Thanks!

     

    --mobrien118

  • 07-28-2009 08:45 AM In reply to

    Re: Adding a true/false value into secondary data source

    You can save your form as source files and open the schema file for the secondary data source (.xsd -- depending on your secondary data source type, you may have to do a little looking to find the right one) in a text editor. Then, find the element you wish to change -- it will have the data type xsd:string. You can change that to xsd:boolean. You may also want to add the 'nil ' attribute to it by including nillable="true".

    So, your element would change from:

    < xsd:element name = "Warnings" type = "xsd:string" ></ xsd:element>

    to:

    < xsd:element name = "Warnings" type = "xsd:boolean" nillable = "true"></xsd:element>

    As an example.

    Hilary Stoupa

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