Friday, April 20, 2012

Reset or Clear Multi select list box values for reloading with new values

Think suppose, if you come across of requirement ‘clear/reset values of multi select or repeating group’ you don’t have direct way in InfoPath as we do for Set Field Value. Because, InfoPath won’t allow us to select Group in Set Field Value action.
Hence what you do is, create a text field with the name that you like for Multi Select List box say “StatesList” and then Create a group say name as “Empty Group”
Now, in go to set field value action and select “StatesList” in Field and select “EmptyGroup” in Value and then click ok to finalize the rule.

Now, delete “StateList” text field and create Multi Select List box with same name “StatesList”.
If infopath is not allowing you to select Group field in Value, do same technique of creating text field with group name and use it in rule and then delete it and recreate Group field.
Every thing works as expected even though you deleted the “StatesList” text field. Rule will still alive and work properly on newly created multi select list box.


Cheers..!

Raj

No comments:

Post a Comment