Hi Lorenzco,
It seems like you've done what I described in this HowTo:
http://infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85 but you need an easier way. Makes sense. Try this:
Assuming your schema is something like this:
RepeatingGroup
--Name
--Number
--Department
--Etc.
Drag and drop the RepeatingGroup node (from the database) onto the view as a repeating section. Double-click the repeating section on the view, go to Display tab, and then click Conditional Formatting. Add this formula:
CompanyName | is not equal to | CompanyNameDropDown -> Hide this control
After this is done you can place all the fields that you want to show and it will show/hide the entire section depending on the dropdown value.
Hope this helps!
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge