Prebacivanje Pogledajte View temelju korisničkog ID-u InfoPath obrasca

Imali smo razvili InfoPath obrazac s više pogleda kako bi podržao novi najam / on-boarding process. When the company hires a new person, IT odjel i druge skupine trebaju poduzeti akciju (postaviti plaće, omogućiti pristup odgovarajućim aplikacijama, locirati stol, itd.). We use on form but a different view of the form for each of those functions.

Na ovom mjestu, većina ljudi koji su uključeni u poslovnom procesu se IT-pamet, pa kad su pristupili obrazac, their default view is a "menu" view with buttons that direct them to their specific function. Međutim, we needed to simplify things for the new hire’s direct manager. This person should not see any of the IT related stuff. Zapravo, ona bi trebao vidjeti samo jedan pogled na obrascu, a ne čak imati mogućnost vidjeti druge stavove.

U našem slučaju, da izravni upravitelja računa izravno vezan za obrasca ljubaznošću obratite selektor (which I am always wanting to call a "people picker" iz nekog razloga).

Koraci su sljedeći:

1. U načinu dizajna, idite na Tools -> Obrazac Options -> Otvori i Spremi.

2. Select "rules".

3. Create a new rule whose action is "switch to view" , a čije stanje utjecati na korisničko ime() funkcija.

userName() returns the "simple" user name without the domain. If I log into SharePoint with credentials "domain\pagalvin", userName() 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 (u mom okruženju ionako) vraća domenu i korisnički ID, as in "domain\pagalvin". This prevents us from doing a straight-forward equality condition since AccountID ("domain\pagalvin") nikada neće biti jednak korisničko ime() ("pagalvin").

We can get around this using the "contains" operator: AccountID sadrži korisničko ime().

Možemo uzeti ga dalje i pre-daj hard-kodirana domene ispred korisničko ime() funkcionirati da se naša jednakost provjeriti i eliminirati rizik od lažno pozitivan na sadrži operatoru.

We would have REALLY like to automatically switch view for other users based on their AD security group membership. Na primjer, when a member of the "IT Analytics" Skupina pristupa obrazac, 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", prođe to userName() and return back true or false. Does anyone have any other, pametnija ideja? Is there any SharePoint function we can leverage from InfoPath to make that determination?

</kraj>

Technorati Tags:

3 misli o „Prebacivanje Pogledajte View temelju korisničkog ID-u InfoPath obrasca

  1. Pingback: Infopath Switch View Based On User « Sladescross's Blog

Ostavite odgovor na Eng. R'aed Al_Momani Odustani odgovor

Vaša email adresa neće biti objavljena. obavezna polja su označena *