Checkbox and Calculated Value in a Repeating Table Question... - InfoPath Dev
in

InfoPath Dev

Checkbox and Calculated Value in a Repeating Table Question...

Last post 08-04-2012 04:41 AM by Rod Wilkins. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-03-2012 04:32 PM

    Checkbox and Calculated Value in a Repeating Table Question...

    I'm using InfoPath 2010 with Sharepoint 2007.

    I have designed a form that pulls data from a SharePoint List.  It's basically a checklist.  What I'm trying to do is use this secondary data source for the checklist values, and provide a checkbox in another column that can be ticked, and then save which line was ticked with a corresponding date/time stamp in the form (for each row).

    The dilemma is I don't want these values saved in my SharePoint datasource as there may be many forms each in various states (this would only work for a single form instance but I will have several). So I'm trying to save the corresponding state of the checkbox and selected date/time within the form itself to be viewed later after being submitted and re-opened from a SharePoint library.   I've created the table that's bound to the secondary data source and have 'dummy' columns setup for the checkbox and time stamp columns in the SharePoint data source.  So functionally, it does allow me to have independent checkboxes and I can see a date/time stamp when the box is checked because of my rules, but of course when I upload the form to SharePoint, because it's was a read-only secondary data source the values do not get saved and the checkboxes/times stamps are now blank.   I'm trying to avoid using code and/or qRules as I don't have any programming experience and I'm trying to keep the form as simple as possible..  is there an OOB solution for this?   The Table would look something like:

    Checklist Item 1  / http://urllinkhere / chkbox / date&time

    Checklist Item 2  / http://urllinkhere / chkbox / date&time

    ..... So on and so forth for however many items I have in my SharePoint list...

  • 08-03-2012 04:46 PM In reply to

    Re: Checkbox and Calculated Value in a Repeating Table Question...

    Well, the issue is, as you mention, we can't update a secondary data source in the form, only the main data source. I'm not really understanding why you don't want to save the data in the form's main data source.

    I (as usual - I'm starting to think I lack imagination) am having a little trouble following exactly what you are doing, but you may be able to just use CAML and the UpdateListItems web service - no code, no qRules - to update your SharePoint list - here's a link that might help you.

     

    Hilary Stoupa

  • 08-03-2012 05:46 PM In reply to

    Re: Checkbox and Calculated Value in a Repeating Table Question...

    Ok for clarity, I have a SharePoint List (secondary data source) that contains my checklist items, and in addition I have a SharePoint Library I plan to submit my completed forms to.

    What I need to be able to do is make the necessary checkbox selections and corresponding timestamps when opening a new form, and later be able to view what was checked and time stamped the next time the form is opened after being submitted to the SharePoint library.

    My problem is that I will be creating a new form for each time the checklist items need to be individually selected, and whether certain lines are checked or not need to be saved on a per-form basis.   If I write the values in my 'checkbox' and 'timestamp' fields to the corresponding field in the SharePoint list (secondary data source), then they will appear the same for everyone that opens the form and changes will be seen on all forms since they're pointing to the same location.   So I need a way to capture this information in the form itself and pair it up with the secondary data source without special code or qRules.....

  • 08-03-2012 10:35 PM In reply to

    Re: Checkbox and Calculated Value in a Repeating Table Question...

    Rod Wilkins:
    My problem is that I will be creating a new form for each time the checklist items need to be individually selected, and whether certain lines are checked or not need to be saved on a per-form basis.   If I write the values in my 'checkbox' and 'timestamp' fields to the corresponding field in the SharePoint list (secondary data source),
     

    As Hilary replied before, you cannot

    • "write the values in my 'checkbox' and 'timestamp' fields to the corresponding field in the SharePoint list (secondary data source)",

    you can only show them or use in rules, code, etc., copy them into main data source in order to be persisted (saved in a list and further retrieved), etc.  

    Rod Wilkins:
    then they will appear the same for everyone that opens the form and changes will be seen on all forms since they're pointing to the same location.   So I need a way to capture this information in the form itself and pair it up with the secondary data source without special code or qRules.....

    Why do you need lists for this at all?

    Create a (.XSN) form template with desirable fields (controls with underlying data fields) in Infopath Designer, publish it into the form library (for maintenance issues like versioning, relinking, etc.) and instantiate multiple forms with data (they are usually .XML files but it depends) based on one template (this again depends, it is possible to have many), store and open them. I would do the latter in a document library separate from form library storing form templates.

     BTW, I am also confused by a "calculated value" (present in each title of this thread) but not mentioned anywhere in the posts body at all

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 08-04-2012 04:41 AM In reply to

    Re: Checkbox and Calculated Value in a Repeating Table Question...

    Thanks for the response.   :)   By calculated value I mean it just uses the now() function to time stamp the checklist item (updating the 'date&time' timestamp field) that's been checked through a rule on the checkbox control.

    I'm using a list because I may want to add/remove columns of data later, depending on growth/scope of the form.  But I want a centralized place to maintain this list through SharePoint hence why I stored my secondary data there.   In fact it's actually three different lists (basically a matrix) that the form will pull from depending on choices made in the form.   I have the form pulling the data the way I want to which, in itself, appears exactly as I would like it to - it just doesn't function as I would like it to (i.e. the saving of the 'checked' and 'timestamp' fields for later viewing/updating after being submitted to the Sharepoint Library).

    I'm open to suggestion on a better way but I'm trying to keep the form as dynamic as possible with as little code as possible, so making a change to the sharepoint list(s) will feed into any new form that's created (using the published template file from the SharePoint library), without affecting previously submitted ones.   I know what I'm trying to do with the form is far from complex compared to how some use InfoPath so I'm sure there must be a way to do this.   I looked at the link provided by Hilary for CAML queries and I think that will let me update a sharepoint list with changes from my form, but I don't actually want to make any changes to the datasources in SharePoint using my form.  They will remain basically a read-only stream as far as the form is concerned, my intent being to update them directly within the SharePoint list manually as required, since the values (i.e. my 'checklist items') will not change very often.  That said, I'm trying to keep maintaining the list easy for my work colleagues so they will not require knowledge of InfoPath or XML to make necessary changes to the SharePoint list(s) themselves, when it's actually required.

    After looking through qRules a little bit.. it seems the 'copytable' feature may help me do what I need to (making a copy of the read-only data source into a mirrored table in the form I can then manipulate, as mentioned here: http://claytoncobb.wordpress.com/tag/qrules/), but I'm trying to avoid using code and taking this route if at all possible...

    I'm also confused on your paragraph:

    Gennady Vanin (Геннадий Ванин, Новосибирск):
    Create a (.XSN) form template with desirable fields (controls with underlying data fields) in Infopath Designer, publish it into the form library (for maintenance issues like versioning, relinking, etc.) and instantiate multiple forms with data (they are usually .XML files but it depends) based on one template (this again depends, it is possible to have many), store and open them. I would do the latter in a document library separate from form library storing form templates.

    Could you explain what you mean in a little more detail, step-by-step so I can see if this might work for me?

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