Hi, I have a field called category, when "category 2" is selected in this field a people picker (Called AssignedTo) appears which i want to be mandatory ONLY when category is selected - i.e. i need conditional validation. Because you can't add a validation rule to a people picker field, I have created a text field called AssignedToTB. The default value of AssignedToTB is the DisplayName element of the AssignedTo people picker. I have added a validation rule to the AssignedToTB field that says if category is equal to Category 2, the AssignedToTB becomes a required field.
I added the AssignedToTB field to the bottom of the form to test the problem that I am experiencing:
In previewing the form, I select Category 2 meaning the people picker appeared (its in a section with a rule to make the setion appear). The AssignedToTB field also gets a red asterix - as it should because the validation rule is now activated. Then I enter a valid name of an employee into the people picker field (lets say Joe Bloggs) and in the AssignedToTB field the red asterix changes to a red dashed border suggesting that the contents are invalid. The form fails to submit using the custom submit button throwing up a validation error. The custom submit button sets the value's of some unrelated fields and initiates a data connection which emails the form
The AssignedToTB field is text (string), with no formatting rules. The field is set to refresh when the formula is recalculated.
As far as i can see, there is no reason why a name such as Joe Bloggs is classed as invalid data in a text (string) field.
Does anyone haev any ideas why this might be happening?
Thanks,
Ben