Implement the string function in InfoPath 2010
I have designed an InfoPath 2010 form with two views and published in SharePoint 2010 form library thru central admin.
The two views are:
- Data Entry View
- Read Only View
Condition is: After submitting the Data Entry view if the same user try to open the form it will redirect to Read Only View. In my data entry view i have user full name field, so i am not dealing with username() only, i am dealing with user full name. For example when the form is opening full name is displaying on the form: like Sumit Kumar, For this empname Windows logon name is: sumit_k
Now how can i set th开发者_如何学Goe rules in infopath, so that more than one time user can not submit the form. There are so many condition in rules: like contains, begins with, matches pattern, is present etc.
How can I implement the above logic based on rules?
You just have to use a "Form Load" rule.
If i understand correct the user full name field will not be empty after you've submitted the form. If this is so you can check if this field is empty or not when the form loads.
So make the rule like this
- New Rule - Action Rule
- Condition - "name of you username field" is not blank
- Run these actions - switch views (pick your read only view)
Now everytime your form will be opened this rule will be triggered and if the username field is empty you'll get your default Data entry view. When it's filled in you will get the read only view.
精彩评论