Do repeating tables work with refresh button, um don't think so? - InfoPath Dev Sign in | Join | Help in Data Connections InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Data Connections » Do repeating tables work with refresh button, um don't think so? Do repeating tables work with refresh button, um don't think so? Last post 05-20-2010 05:36 PM by Hilary Stoupa. 14 replies. Page 1 of 1 (15 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 04-28-2010 09:06 AM texastwo Joined on 12-16-2009 Posts 49 Do repeating tables work with refresh button, um don't think so? Reply Contact I have a repeating table that is loaded with secondary data upon opening form. It appears once submitted the form does not reload secondary data when re-opened for edits. Once a form is submitted and then re-opened for editing, the form contains old secondary data. The need for refresh comes from this grief. With a static table the refresh button works well(albeit forever), but moved to the repeating table and the refresh command quit working. Is there a work around, (Why is it I find myself working around "everything" with sharepoint and infopath) Filed under: Infopath data connection, infopath data connection sharepoint lists, infopath 2007 04-28-2010 10:32 AM In reply to Patrick Halstead Joined on 08-07-2006 Posts 5,112 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact Hey TexasTwo, Make sure you aren't caching the secondary data source and that the XML data source is set up to be included in the XSN. You may need to add the XML as a resource. If the file is changing outside of the XSN, you can make it external and it will load on open if you have it checked. Probably just need to reconfig the data source. Should work fine. Refresh won't work because data sources are loaded on open or on query. If you don't want it to load on open, add a button with a rule and action to query the secondary data source. That can be your "refresh" if you want to refresh. :) Happy days, Patrick Patrick HalsteadProject Manager at Qdabra 04-28-2010 11:12 AM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact Patrick, Thanks for the quick response. I'm a little confused by "make sure I'm not caching" I have the form set to load the secondary data when opened, and that works. ( I have not checked the store copy of data in form) But once the form is submitted, it will not get the secondary data the next time the form is opened, for editing. (sounds like caching) I disabled the "automatically load secondary data" and tried to force via button the query, or refresh and the repeating table will not populate. A non repeating table will populate however? And the secondary data can change outside of this form between submit and editing. No luck on the resource file, but thats unchartered territory. I was looking to paste the code, didn't see that option. Your thoughts? 04-28-2010 05:06 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact Hi -- I'm confused. What is your repeating table bound to? Your secondary data source? I'd expect this to always show the data as it is in the original data source. Thus, if you have a repeating table on your form that is bound to a data source that receives data from a SharePoint List (for example) and you change values in the fields in the table, and you save and close your XML.... the next time you open it, you SHOULD be seeing the data from the SharePoint List -- those changes you made SHOULD be gone. But it sounds like you are saying you are having an entirely different experience! When you say "...once the form is submitted, it will not get the secondary data the next time the form is opened" do you mean that the repeating table bound to the secondary data source is blank (doesn't have any rows)? Or do you mean that you are able to change data values in a control bound to a secondary data source and when you open the saved XML, the changes are still there? Since only the XML from the main data source is saved, that would be a very surprising outcome. Any chance you can post your template? (Under the Options tab, there is a place to attach a file). Hilary Stoupa 04-28-2010 05:52 PM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, um don't think so? texastwo rev b.xsn Mark as Not AnswerMark as Answer... Reply Contact I was sent down this path, it is entirely possible I'm all wet. You guys have forgotten more about these tools than I'll ever know..I can confuse the best.. It's a gift! Hi -- I'm confused. What is your repeating table bound to? Repeating table is bound to "group2", The "field1" is @Summary[@ID = countdown] which is my secondary data source? The countdown allows me to select a range to repeat. (Using the tools> default values) I'd expect this to always show the data as it is in the original data source. Thus, if you have a repeating table on your form that is bound to a data source that receives data from a SharePoint List (for example) and you change values in the fields in the table, and you save and close your XML.... the next time you open it, you SHOULD be seeing the data from the SharePoint List -- those changes you made SHOULD be gone. This is not the case, if I submit the form, the next time the form is opened, it has the same data from the secondary table that was there upon submit. I require a refresh for it to go get the current states of the secondary data that is dynamic and has changed since the orginal submit.. But it sounds like you are saying you are having an entirely different experience! When you say "...once the form is submitted, it will not get the secondary data the next time the form is opened" do you mean that the repeating table bound to the secondary data source is blank (doesn't have any rows)? If the form is setup to "get secondary data when form is opened" and the form is submitted, then yes the original data is there. However if the form "does not get secondary data upon opened" the table is blank. And refresh and query will not populate the repeating table. But static tables fill fine. Or do you mean that you are able to change data values in a control bound to a secondary data source and when you open the saved XML, the changes are still there? Since only the XML from the main data source is saved, that would be a very surprising outcome. If I understand the syntax of what your saying, yes, I belieive this to be true Any chance you can post your template? (Under the Options tab, there is a place to attach a file). Yes 04-29-2010 12:14 PM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact Please don't waste your time with this any longer. I gave it 2days and thats enough. I certainly appreciate all of the expertise that this site offers above all others. Searchable, functionable and knowlegable. Not only are you guys responsive (between your day jobs) but everything infopath and the brain trust around it is right here. Kudos! I thought... I was onto a major breakthrough for simplifing the code rebuild for my infopath effort, but truth is the tool has real limits and I keep finding them. The form works great on the first open and submit. Once submitted the form does not look at the secondary data again when you open it back up to edit it. The problem is this particular form is very collaborative and the secondary data is dynamic. Without the ability to "Refresh" or "Query" to update the repeating table with the changing data that is the secondary data, this effort is dead. I will return to switch logic / static tables and the labor intensive code to make this happen. Thanks Again! 04-29-2010 03:25 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Do repeating tables work with refresh button, um don't think so? texastwo rev b.xsn Mark as Not AnswerMark as Answer... Reply Contact Your refresh button refreshes your secondary data source. The controls on your form are bound to your main data source. I see the form has code, so I'm going to guess you are copying the data from your secondary data source into the main data source. If you simply want to always have the latest from the secondary data source show, bind your control to that. See attached. Hilary Stoupa 04-29-2010 04:23 PM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact Pardon my ignorance If you simply want to always have the latest from the secondary data source show, bind your control to that. See attached.? Please clarify, bind my control to ... what? 04-29-2010 04:28 PM In reply to Patrick Halstead Joined on 08-07-2006 Posts 5,112 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact To the secondary data source. Right click the control and choose "Change binding". Select the secondary data source in the dropdown. OK. Good to go! :) Patrick HalsteadProject Manager at Qdabra 04-29-2010 04:35 PM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact I was focused on the button, I saw no binding there. Not sure this will work either , I lost some of the control that I had with main. But I certainly will experiment with it and appreciate you guys very much!!! 04-30-2010 10:43 AM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact OK, Ok..This is a HUGE revelation! Out of the countless novels I've read this little snippet, was grossly overlooked, and not well presented. A game changer for me. I was using secondary data as a reference only. Not dynamic.I think, I know the answer, but would like some guidance to the next step. I have the small repeating table, with a checkbox in it.(19 records) I use the rule to force the secondary tables repeating checkbox to copy the row id into my caml template and submit using the webservice. It works well albeit one box at a time.So the question is, if the caml template is in a repeating table that the rule sends the Id to (singular), how can I send multiple ids. Is there a codeless way of doing this? Can you point me in the direction to be able to make multiple selections with one submit. Thanks abunch. 04-30-2010 12:33 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact We have a tool called qRules that can submit mulitple items to a SharePoint List, and you can check that out here. However, it is meant for use with the form's main data source, not a secondary data source. Based on your email, though, I'm kind of wondering about your adding rules to your checkbox field and then, when it changes, take care of your list submit then. So that the user doesn't have to click a button to update the SharePoint list, it just happens in realtime -- check the box, CAML gets updated, a Submit action runs to submit the CAML, secondary data source query is queried to make sure the repeating table has the latest and greatest from the list, user is none the wiser.... Hilary Stoupa 04-30-2010 02:57 PM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, um don't think so? Mark as Not AnswerMark as Answer... Reply Contact Genius, I will investigate! 05-19-2010 07:18 PM In reply to texastwo Joined on 12-16-2009 Posts 49 Re: Do repeating tables work with refresh button, I think so!!! Mark as Not AnswerMark as Answer... Reply Contact I'm finally getting back to this (to many trips) and I have run into a problem that I posted seperate, not knowing if this threaded expired.... I added the rule to set the value at the time the box is selected using a web service, updatelistitem. I was moving along but began to stumble. Using the webservice and the caml code routine that Matt F. presented. I was not able to use the check box in its binary form. (yes or no column) This column value is set to the "ID" of the checked box (row), thus loosing its binary status from the caml batch code. I tried a option box, with two choices with modest success. Flagging two different columns depending on the option box status and using workflow to decypher and create a mutually exclusive condition. Needless to say, there are many pitfalls to using the workflow approach. Does this make sense, I know we have all slept since then. Any suggestions? Was webservice not the right solution or did I miss something with the caml? Thanks 05-20-2010 05:36 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Do repeating tables work with refresh button, I think so!!! Mark as Not AnswerMark as Answer... Reply Contact Oh dear. I'm confused again. What field is your checkbox bound to? You definitely don't want it bound to the ID field in the SharePoint list... Hilary Stoupa Page 1 of 1 (15 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
I have a repeating table that is loaded with secondary data upon opening form.
It appears once submitted the form does not reload secondary data when re-opened for edits. Once a form is submitted and then re-opened for editing, the form contains old secondary data. The need for refresh comes from this grief.
With a static table the refresh button works well(albeit forever), but moved to the repeating table and the refresh command quit working.
Is there a work around,
(Why is it I find myself working around "everything" with sharepoint and infopath)
Hey TexasTwo,
Make sure you aren't caching the secondary data source and that the XML data source is set up to be included in the XSN. You may need to add the XML as a resource. If the file is changing outside of the XSN, you can make it external and it will load on open if you have it checked. Probably just need to reconfig the data source. Should work fine. Refresh won't work because data sources are loaded on open or on query. If you don't want it to load on open, add a button with a rule and action to query the secondary data source. That can be your "refresh" if you want to refresh. :)
Happy days,
Patrick
Patrick,
Thanks for the quick response.
I'm a little confused by "make sure I'm not caching" I have the form set to load the secondary data when opened, and that works. ( I have not checked the store copy of data in form) But once the form is submitted, it will not get the secondary data the next time the form is opened, for editing. (sounds like caching)
I disabled the "automatically load secondary data" and tried to force via button the query, or refresh and the repeating table will not populate. A non repeating table will populate however?
And the secondary data can change outside of this form between submit and editing.
No luck on the resource file, but thats unchartered territory.
I was looking to paste the code, didn't see that option.
Your thoughts?
Hi -- I'm confused. What is your repeating table bound to? Your secondary data source? I'd expect this to always show the data as it is in the original data source. Thus, if you have a repeating table on your form that is bound to a data source that receives data from a SharePoint List (for example) and you change values in the fields in the table, and you save and close your XML.... the next time you open it, you SHOULD be seeing the data from the SharePoint List -- those changes you made SHOULD be gone.
But it sounds like you are saying you are having an entirely different experience! When you say "...once the form is submitted, it will not get the secondary data the next time the form is opened" do you mean that the repeating table bound to the secondary data source is blank (doesn't have any rows)? Or do you mean that you are able to change data values in a control bound to a secondary data source and when you open the saved XML, the changes are still there? Since only the XML from the main data source is saved, that would be a very surprising outcome.
Any chance you can post your template? (Under the Options tab, there is a place to attach a file).
Hi -- I'm confused. What is your repeating table bound to? Repeating table is bound to "group2", The "field1" is @Summary[@ID = countdown] which is my secondary data source? The countdown allows me to select a range to repeat. (Using the tools> default values)
I'd expect this to always show the data as it is in the original data source. Thus, if you have a repeating table on your form that is bound to a data source that receives data from a SharePoint List (for example) and you change values in the fields in the table, and you save and close your XML.... the next time you open it, you SHOULD be seeing the data from the SharePoint List -- those changes you made SHOULD be gone.
This is not the case, if I submit the form, the next time the form is opened, it has the same data from the secondary table that was there upon submit. I require a refresh for it to go get the current states of the secondary data that is dynamic and has changed since the orginal submit..
But it sounds like you are saying you are having an entirely different experience! When you say "...once the form is submitted, it will not get the secondary data the next time the form is opened" do you mean that the repeating table bound to the secondary data source is blank (doesn't have any rows)? If the form is setup to "get secondary data when form is opened" and the form is submitted, then yes the original data is there. However if the form "does not get secondary data upon opened" the table is blank. And refresh and query will not populate the repeating table. But static tables fill fine.
Or do you mean that you are able to change data values in a control bound to a secondary data source and when you open the saved XML, the changes are still there? Since only the XML from the main data source is saved, that would be a very surprising outcome. If I understand the syntax of what your saying, yes, I belieive this to be true
Any chance you can post your template? (Under the Options tab, there is a place to attach a file). Yes
Please don't waste your time with this any longer. I gave it 2days and thats enough.
I certainly appreciate all of the expertise that this site offers above all others. Searchable, functionable and knowlegable. Not only are you guys responsive (between your day jobs) but everything infopath and the brain trust around it is right here. Kudos!
I thought... I was onto a major breakthrough for simplifing the code rebuild for my infopath effort, but truth is the tool has real limits and I keep finding them.
The form works great on the first open and submit. Once submitted the form does not look at the secondary data again when you open it back up to edit it. The problem is this particular form is very collaborative and the secondary data is dynamic. Without the ability to "Refresh" or "Query" to update the repeating table with the changing data that is the secondary data, this effort is dead. I will return to switch logic / static tables and the labor intensive code to make this happen.
Thanks Again!
Your refresh button refreshes your secondary data source. The controls on your form are bound to your main data source. I see the form has code, so I'm going to guess you are copying the data from your secondary data source into the main data source. If you simply want to always have the latest from the secondary data source show, bind your control to that. See attached.
Pardon my ignorance
If you simply want to always have the latest from the secondary data source show, bind your control to that. See attached.?
Please clarify, bind my control to ... what?
To the secondary data source. Right click the control and choose "Change binding". Select the secondary data source in the dropdown. OK. Good to go! :)
I was focused on the button, I saw no binding there. Not sure this will work either , I lost some of the control that I had with main. But I certainly will experiment with it and appreciate you guys very much!!!
Thanks abunch.
We have a tool called qRules that can submit mulitple items to a SharePoint List, and you can check that out here. However, it is meant for use with the form's main data source, not a secondary data source. Based on your email, though, I'm kind of wondering about your adding rules to your checkbox field and then, when it changes, take care of your list submit then. So that the user doesn't have to click a button to update the SharePoint list, it just happens in realtime -- check the box, CAML gets updated, a Submit action runs to submit the CAML, secondary data source query is queried to make sure the repeating table has the latest and greatest from the list, user is none the wiser....
Genius, I will investigate!
I'm finally getting back to this (to many trips) and I have run into a problem that I posted seperate, not knowing if this threaded expired....
I added the rule to set the value at the time the box is selected using a web service, updatelistitem. I was moving along but began to stumble.
Using the webservice and the caml code routine that Matt F. presented. I was not able to use the check box in its binary form. (yes or no column) This column value is set to the "ID" of the checked box (row), thus loosing its binary status from the caml batch code. I tried a option box, with two choices with modest success. Flagging two different columns depending on the option box status and using workflow to decypher and create a mutually exclusive condition. Needless to say, there are many pitfalls to using the workflow approach. Does this make sense, I know we have all slept since then.
Any suggestions? Was webservice not the right solution or did I miss something with the caml?
Thanks
Oh dear. I'm confused again. What field is your checkbox bound to? You definitely don't want it bound to the ID field in the SharePoint list...