Showing posts with label Infopath 2007. Show all posts
Showing posts with label Infopath 2007. Show all posts

Thursday, March 22, 2012

How to clear infopath template cache

Why we need to clear infopath template cache ?

Basically sometime new changes in infopath template is not reflect on production environment after publishing the template, the reason is infopath cache. Your new template has successfully published on server machine, so don't need to worry about that. You need to remove / clear infopath cache from user machine(s) only.

Just open RUN and type infopath/cache clearall then press OK button.

Now you can open your infopath form and can see new changes in it.


How to clear all data in repeating table with rule in infopath 2007

Repeating Table Structure
Your repeating table structure looks like an right image, suppose you want to clear all data from "JobHistoryRow" on button click with rule. If you apply simple rule for that, you will get warning message.
Now move to the solution. You need to add one group field and one string field in your data source by using Add a Field or Group link. Suppose group field name is "group1" and string field name is "age". Now open the rule window, click on "Add Action" button, action should be "Set a field's value". This action will take 2 parameters one is Field and second is Value. You will set Field is equal to "age" and Value is equal to "group1", save the rule and close your manifest file.

Now open your manifest file in "XML Editor" and search your that rule by name, suppose your rule name is "Clear Repeating Table". You will see "targetField=my:age", here we need to change "my:age" with "my:JobHistorySection/my:JobHistory/my:JobHistoryRow", save the form and close.

Now please open your manifest file in designer and open the rule "Clear Repeating Table", you will see the changes in it. Now time to publish the form and check the rule. It's working fine in my case.