Bind a checkbox to secondary data source - InfoPath Dev
in

InfoPath Dev

Bind a checkbox to secondary data source

Last post 01-28-2013 10:55 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-25-2013 01:58 AM

    Bind a checkbox to secondary data source

    I need to bind the check box in a read-only view form to a secondary data source so that it reflects their changing values with form refreshes.  So far, I have an input form which popluates a form library, and overwirites the exsiting data with values submitted by a web-based InfoPath form.

    Next, I'd like to be able to display the current values from the form library in a similar form, that is used only for displaying the data (read-only); the problem I'm having, is that even though the new read-only view form is connected to the secondary data source, and I have added a number of check box fields from the secondary data source to the new form, the check boxes don't reflect the values stored in the form library, unless I change them to text fields (which then reflects 0 or 1, depending on the current value of the data stored in the form library).

    Since this is essentially a check list, all of the controls are check boxes; the input functionality is working fine, as is the data connection, and the read-only view's binding to the secondary data seems effective. The problem I'm having, is the check box does not update (checked or unchecked) to reflect this same data.

    Thanks, in advance!

    Thomas

  • 01-25-2013 04:28 PM In reply to

    Re: Bind a checkbox to secondary data source

    What are the values on the checkboxes? That is, if you right click the checkbox and look under properties, what is the value that indicates checked and what is the value for unchecked? I added a checkbox to a template bound to a 2DS and the values for checked and cleared are 'yes' and 'no' - you can modify this in the source files for the form - I don't think there is any way to do it in the UI.

    Hilary Stoupa

  • 01-26-2013 01:19 AM In reply to

    Re: Bind a checkbox to secondary data source

    Hi Hillary,

    Thanks for your response!

    I kept the default values, which I believe are True/False; when I change the viewing form's controls from checkbox to text field, the value is displayed as 1 & 0 (true and false, respectively), since I can see the values update in the SharePoint list, I know the data entry form is working, and since the text field's are reporting the data correctly (albeit as 1s and 0s), I know the data connection and viewing forma are working; this behavior/issue seems to be unique to check boxes.

    Q: Will changing the values to Yes/No (vice True/False) in the source files result in the viewing form's radio boxes being updated to reflect the controls as being checked or unchecked?

    Q: What's a 2DS?

    Thanks!

    Thomas

  • 01-28-2013 08:20 AM In reply to

    Re: Bind a checkbox to secondary data source

    2DS is shorthand for secondary data source. If you right click the checkbox, what are the checked and cleared values for the control?
    Hilary Stoupa

  • 01-28-2013 10:22 AM In reply to

    Re: Bind a checkbox to secondary data source

    True and False.
  • 01-28-2013 10:55 AM In reply to

    Re: Bind a checkbox to secondary data source

    And it sounds like your actual data, from your earlier post is 1 / 0? I think you'll have to modify the view file to use 1 & 0 for the values for the control in order to have your checkbox display correctly. Another option would be just use a section for this with a couple of characters that look like a selected or deselected checkbox (Wingdings รพ for checked, o for blank) and show / hide them based on whether your secondary data is 1 or 0 - depends on whether you need the checkbox to be functional or if it is just for display....
    Hilary Stoupa

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