Tulikuwa na maendeleo ya fomu InfoPath pamoja na maoni mbalimbali ya kusaidia kukodisha mpya / on-boarding process. When the company hires a new person, Idara ya IT na makundi mengine ya haja ya kuchukua hatua (kuanzisha mishahara, kuwawezesha kupata maombi ya mwafaka, Machapisho ya dawati, nk). We use on form but a different view of the form for each of those functions.
Wakati kampuni hii, zaidi ya watu waliohusika katika mchakato wa biashara ni IT-savvy, hivyo wakati wao kupata fomu, their default view is a "menu" view with buttons that direct them to their specific function. Hata hivyo, we needed to simplify things for the new hire’s direct manager. This person should not see any of the IT related stuff. Kwa kweli, yeye anapaswa kuona moja tu mtazamo wa fomu na hata kuwa na chaguo kuona maoni ya wengine.
Katika kesi yetu, kwamba akaunti ya moja kwa moja meneja wa moja kwa moja amefungwa kwa hisani fomu ya kuwasiliana selector (which I am always wanting to call a "people picker" kwa sababu baadhi ya).
hatua ni kama ifuatavyo:
1. Katika hali ya kubuni, kwenda Tools -> Fomu Chaguzi -> Kufungua na Ila.
2. Select "rules".
3. Create a new rule whose action is "switch to view" na ambao hali leverages jina la Mtumiaji() kazi.
jina la Mtumiaji() returns the "simple" user name without the domain. If I log into SharePoint with credentials "domain\pagalvin", jina la Mtumiaji() returns "pagalvin".
The contact selector provides three bits of information for a contact. The "AccountID" portion is most useful for this scenario. The only thing that makes this even a little bit of challenge is that the contact selector (katika mazingira yangu anyway) anarudi domain na user ID, as in "domain\pagalvin". This prevents us from doing a straight-forward equality condition since AccountID ("domain\pagalvin") kamwe sawa na jina la Mtumiaji() ("pagalvin").
We can get around this using the "contains" operator: AccountID ina jina la Mtumiaji().
Tunaweza kuchukua ni zaidi na kabla ya pend uwanja ngumu-coded mbele ya jina la Mtumiaji() kazi ya kupata usawa wetu kuangalia na kuondokana na hatari ya chanya ya uongo juu ina operator.
We would have REALLY like to automatically switch view for other users based on their AD security group membership. Kwa mfano, when a member of the "IT Analytics" kikundi wanapata fomu, automatically switch to the IT Analytics view. We didn’t have time to implement it, but my first thought is to create a web service that would have a method like "IsMemberOfActiveDirectorySecurityGroup", kupita ni jina la Mtumiaji() and return back true or false. Does anyone have any other, wajanja zaidi wazo? Is there any SharePoint function we can leverage from InfoPath to make that determination?
</mwisho>
Shukrani nyingi Mr. Paulo
Pingback: Infopath Switch View Based On User « Sladescross's Blog