Required fields in a repeating section

B

Boske

Hi,

I have a repeating section in my InfoPath form were a certain number of
controls (text boxes, drop downs, datetime pickers, etc.) can be filled
out. Some of them are required, f.e. you need to select 1 of the 5
options in the drop down. By default the dropdown shows the first item.


When the form runs and I want to add an item to the repeating section,
the dropdown shows the first item but is marked with a red asterisk as
if nothing is filled out. When I try to save, it gives me the error
message "Some rules cannot be applied .... Errors are marked with
either a red asterisk (required fields) ...".

Does anyone know how to solve this?

Thanks in Advance

Karine Bosch
 
S

Scott L. Heim [MSFT]

Hi Karine,

I am not sure I follow: the red asterisk is an indicator a field is
required before submission can occur. So when you first open your form, the
drop-down list is blank (no data) - correct? If so and if this field is
"required" it should display the red asterisk. Now, once you select an item
from the list, that indicator should be gone.

Does this help or am I missing something? (If so, I apologize!)

Thanks,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Boske

Hi Scott,

Sorry if my question isn't clear.

The content in the dropdown is always required. But when the forms
open, the first item has a value filled out in the dropdown and is
considered as a valid entry by InfoPath. When adding a second item to
the repeating section, the dropdown is also filled out with a value but
when you try to save this, the form considers the dropdown in the
second item as empty. It doesn't see the default value as a valid
entry.

What do you think about this?

Thanks,

Karine Bosch
 
S

Scott L. Heim [MSFT]

I think I am unclear on the process! :)

- "When the form is opened, the first item has a value filled in the
drop-down and is considered a valid entry."
XML file (one that was previously created from the XSN?)

- "When adding a second item to the repeating section, the dropdown is also
filled out with a value but when you try to save this, the form considers
the dropdown in the second item as empty."
exact value? If so, I cannot reproduce this behavior.

Here are the steps I followed:

- Created a new, blank InfoPath form
- Added a Repeating Section
- Added a text box and drop-down list box to the Repeating Section
- Right-clicked on the drop-down list box, chose Properties and added A, B
and C as items for the drop-down.
- Set "A" as the default and enabled the option: Cannot be blank
- Previewed the form and on the first (and only at this point) record, "A"
was displayed.
- Added a new Repeating Section by clicking the default link: Insert Item
and again, "A" was completed and valid.

Does this help at all?

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top