Monday, October 20, 2008

Data validation, Filter Data: Case Sensitive

When you add data validation or you want to filter data, you already saw that the conditions are Case Sensitive.

Example:
When you have a text box and you don't want the user to fill in the value abc.  When adding the Data validation Field 1 equal to "abc", then show message box.

When the user enter ABC, the message box isn't popped up.

Solution:

There is no uppercase or lowercase available in InfoPath, the easiest way to reach or goal is to use the Translate function:

So the data validation rule will be:

- Select The Expression in the first dropdown
- Add the following condition to the Expression Textbox

translate(., "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") = "abc"


This way of working can be used also to Filter Data.

No comments: