InfoPath 2010 - Change Field value on open - infopath2010

I have an InfoPath form field that currently uses a default value to set it to the current user name when the form opens, but I need it to re-set that field if a different user opens the form later on. Is there a way to tell InfoPath to change the value of that field every time the form is opened?

You can add a rule to be executed everytime the form opens. Do the following:
Go to the "Data" tab.
Click on the "Form Load" button to add a new rule.
On the Rules pane edit the rule so the action is "Set a field's value"
Edit the field and value.
To set the logged in user as value, click on the Insert Function button and select "username" under the "User" section.
Hope it helps!

Have you created the separate list for those username in your site, if so use people picker control, in that control set the action rule by querying the username from data connection and match that name with the username log in

Related

How to make text field to people picker in edit form in SharePoint 2013

There is text filed in which "Author" name saved while submitting new form but while editing that form is there any way by which I can make it People picker and user can select the new name name and save the changes.
Unfortunately Naveen's answer's will not work for you.
The Client People Picker does not apply to SharePoint 2013 on-premise, except when writing a custom AddIn which you are not doing.
You also can't change the existing Text field of Author to be a people field directly as that is an illegal/invalid field type modification.
You will need to edit your existing field and rename it to something like AuthorOld/AuthorText. And then create a new field as a person field named Author.
However, it sounds like you're trying to let the user edit the field for who created the item. That field is locked for editing by end users. You can however, hide that field and just create a new person field with a default value of [Me] (this fills in the current users name when they create an item). Which will let you get the behavior it sounds like you're after :)
What my understanding is in SP Default edit form you have a Text Field to Save the User Value. Now you need to make that Text field as PeoplePicker Control.
You have 2 choice to done this.
1) Go with OOB. Make that Text field which is used to save the "Author" name as User Field. So it will be act as a PeoplePicker control in Both New/Edit Form.
2) Add Content Editor Webpart in the Edit Form. And make that Text Field as Client people picker.
Refer for
Client People Picker
Mark as answer if it helps.

Make few fields of SharePoint list infopath form read only

My requirement is New form should have all fields editable and Edit form should have few fields read-only (Like ID entered by user in New form for the item).
How is it possible through form customization done using Infopath.
You could have a checkbox or any bool control that gets checked when a form is initially filled out and submitted to a SharePoint list, have it change value "on-submit". When the form loads just add a rule that if 'existingForm' (or whatever you name the control) is checked and if it is then disable/or hide the control.
You could disable the controls, or you could hide them completely and display their values through a calculated field/value which is normally hidden.

crm dynamics 2011 add a new value to dropdown list and set default value

I cannot find how to add a country to drop down menu when creating account, lead or contact. At the moment I see only 2 countries. I need to add one more and make it as default one. So when I create lead, contact or account I don't need to choose every time. I have all the rights but no knowledge.
Click on the Customize tab on the top of form ribbon and then select the Form option.
Form will open in edit mode, double click on country field and on new window select the Details tab.
Click on Edit button, a new window will open
Add new option by clicking on the green colour plus button (pointed out in screenshot below).
Select the default country from default value drop down (pointed out in screenshot below).
Save and close the Field window
Save and Publish the form.
You are ready to go.

"Hidden" columns in Sharepoint 2007

I'm trying to make a custom list for inquiries, where users will fill in some information such as "Name", "Reason" etc. When they've finished filling in the information and added the item, the administrator will then go through the item, and fill in some new columns that the user hasn't been able to fill in.
I hope you understand me, otherwise you're more than welcome to ask questions!
With SharePoint designer 2007, you can use the SPSecurityTrimmedControl who enable you to show/hide form field (or site action...).
Syntax :
<SharePoint:SPSecurityTrimmedControl PermissionsString="ManageLists" runat="server">
WHAT_YOU_WANT_TO_HIDE_HERE
</SharePoint:SPSecurityTrimmedControl>
For the PermissionsString, all values HERE
You'll need to use SharePoint Designer. You will create custom new and edit forms. This way when the user fills in the new form, only certain fields will appear. Then when the administrator edits the item using the edit form, they will have access to more fields.
Please see this link for more information.
Try making a copy of the form you wish to edit by copying and pasting to the same folder. Then click on the web part for the form and the code above will highlight . Look for tags IsVisible and change it from "true" to "false". This will hide the default form. Do not delete the original form.
Click on the web part in the design view then press your right arrow. This will move the cursor to right after the web part but still within the web part zone. Go to the Insert menu, select SharePoint Controls then Custom List form. A small dialog window will appear, select the list name from the first drop down, then select the content type from the second drop down. Finally select which form you want to insert, New, Edit or Display. Click OK. The new form will be displayed under the default form, and you will then see all of the fields in order and you can add or remove as you like.
If one did not want to edit the pages, couldn't one use Jquery to hide the fields? I have done this with SPservices. to check the user credentials if you will and then if matched display the hidden fields... all this is done from a web part...just a thought...I actually learned something great today.. great replies.

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 the 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.

Resources