disable infoPath field based on sharepoint list value

I have a list in SharePoint 2013 called "Managers"  that has the names of users.

I also have an infoPath form that has a few fields.  On the form, there are certain fields that only the manager can have access to. I would  those fields to be enabled only for the manager.  It should be disabled for everybody else.

Any ideas?

Thanks!
LVL 5
IsaacSharePoint Client Side DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

melli111SharePoint Administrator / DeveloperCommented:
On the fields that you wish to disable, you need to add conditional formatting.  You'll go into Manage Rules, new, formatting.  Then you'll write your condition.  Your condition would be something along the lines of if currentuser does not equal managerusername(any occurrence) then disable this control.  This is assuming you already have a receive data connection to access the managers list.  If you need more detailed steps please let me know.
0
infoalexCommented:
1. Create SharePoint hosted WCF service returning Security Group name of the current user
2. In InfoPath create data connection to this service
3. For the selected field within InfoPath implement conditional formatting (control disabling). As a data source select the one described in the previous step. Ensure the field is enabled only for the Owner Group users.
0
IsaacSharePoint Client Side DeveloperAuthor Commented:
melli111,

There is no currentuser in the drop down of the condition
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

infoalexCommented:
Is the InfoPath form on the Managers list?
0
IsaacSharePoint Client Side DeveloperAuthor Commented:
What do you mean?
0
melli111SharePoint Administrator / DeveloperCommented:
Add a field to your form for currentUser.  Then set its default value to formula of currentuser().  Then you can use this field in the condition
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.