Napisao sam članak za SharePointBriefing.com and they put it up live today.
Evo teaser:
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
Napisao sam članak za SharePointBriefing.com and they put it up live today.
Evo teaser:
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
I’m been working on a project where I need to extract attachments from an InfoPath form. There are some good resources for parsing InfoPath forms (koji su samo XML datoteke, tako da je zapravo vrlo jednostavno).
Dok sam bio izgradnju projekta, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. Međutim, the InfoPath forms are really living inside a SharePoint forms library. I did a little half hearted searching to find out how to read it directly from the library and almost gave up, in which case I would have saved the form to a local temp directory and read it from there. Međutim, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:
/// Class definicija stvari ovdje, uključujući:
privatni SPFile mySharePointFile; /* Dio je SPList */ // Više kod ide ovdje, a unutar metode u klasi imamo: textReader = novi XmlTextReader(mySharePointFile.OpenBinaryStream()); textReader.WhitespaceHandling = WhitespaceHandling.Nijedan; textReader.Read(); // Ako čvor ima vrijednost dok (textReader.Read()) { |
Oni su ključni malo iznad je da možemo pročitati InfoPath izravno putem OpenBinaryStream() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
I have an expense entry solution for a client that leverages InfoPath and workflow. At one point during the approval process, Trebam generirati e-mail koji je sve to dobrim InfoPath podataka, kao i privitke sebe, tako da (uzdah) netko može uzeti te podatke i ručno ponovno Ključ je u primjeni Oracle baze podataka.
It’s not very difficult to get at or parse the InfoPath form. I didn’t know how to handle the attachments, međutim. After an hour or two of poking around the Internets (vječnosti!) Otkrio sam ovaj članak: http://support.microsoft.com/kb/892730
It provide some handy code to extract the attachment from a node in the form. (Još uvijek je potrebno pronaći čvor i sve to, ali to je samo XML raščlanjivanjem).
Znam da privitak base64 kodiran i ja izvorno je otišao na put samo vađenje u base64 podatke, decoding it and saving it. Međutim, Brzo sam shvatio nisam znao kako da biste dobili naziv datoteke se sve dok nisam pronašla spomenuti članak.
Zapravo sam našao da je dosta rano, ali sam je odložio po podijeljenom osobnošću. U jednu ruku, the article *says* it’s good for InfoPath 2007. Još, kôd i upute su sve o Visual Studio 2003 i reference na InfoPath 2003.
Bottom line, kod koji članak dali radi dobro za mene (dosada). I can get my InfoPath form, Mogu ga analizirati, I can find and decode the attachment and I know its name. What more can one ask of one’s life?
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
Ako ste zabrinuti da vaše SharePoint okoliš može biti TAD nezdravo, dopustite mi da vam pomoći da popraviti sa zdravstvenog pregleda.
Imam proces odobravanja troškova koje trebam realizirati pomoću InfoPath u jednom oblika na temelju provjere autentičnosti (FBA) okruženje pomoću obrazaca usluge (web-based InfoPath).
Postoje dvije grupe odobravanja i postupak radi ovako:
Na InfoPathovom stranu stvari, Imam različite dijelove koji se kriju / pojavljuju na temelju li korisnik član jedne od tih skupina odobrenja.
U FBA okruženju korisničko ime() Funkcija uvijek vraća prazna, nažalost. What I’ve done is set up a a custom list called “Approval Groups”.
Ne dodavati nikakve dodatne stupce na popisu.
Kada se obrazac otvara, to je pravilo ovako:
"Postavite vrijednost polja" je ovdje:
To u osnovi govori: Upit o odobrenju grupe prilagođeni popis i filtrirati taj upit u potrazi za bilo koji redak u kojem naslova vrijednost = "Nordic".
Ako se to vraća nikakvu vrijednost, then the current user is a member of that group. I know it contains that value because the string length is greater than zero.
Close the loop by securing the individual items in the Approval Group list. At run-time, Ako trenutni korisnik nema odgovarajući sigurnosni pristup toj stavci onda upit neće vratiti, string-length will be zero and now you know the current user is not part of that group. You can use that fact as needed in the form.
This is a super brief write-up. I’m pressed for time or I’d provide more detail.
I don’t know how relevant it is that I’m in an FBA environment. This would probably work well in a non-FBA environment but I can imagine cases where this would be useful.
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
Radila sam na InfPath obliku danas i trčao protiv starog prijatelja, "Neobrađene iznimka pri donošenju obrasca System.Xml.XmlException: Neočekivani kraj datoteke pri raščlambi Ime je došlo. "
This happened to me a long time ago and I don’t know what exactly I did to resolve it. Honestly, Mislim da sam bio prelasku na novi projekt, a nikada nije vidio ovo riješiti (moji zamjena morali nositi s tim glavobolje). I do remember it was a devil of a problem. I spent several unsuccessful days dealing with it. Since then, Vidio sam to dolaze na MSDN forumima barem jednom u posljednjih godinu dana i nikada stvarno vidio odgovor za njega.
Ja ga udariti i danas srećom ovaj put , I had just made a change to the form. I backed out that change and the problem went away. It turns out that it’s possible to create a from template using InfoPath Designer in such a way that it generates a parse error on the forms server side of the fence.
U mom slučaju, Problem je uzrokovan ovim koracima:
Ja ne znam da li ti koraci uzrokovati problem ili možda, nekako se podaci u popisu sama je problem. I’m going to experiment a bit and see if I can nail downt he parameters of this with any more detail.
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
Ja sam još uvijek živi u InfoPath Forms svijetu i morala sam napraviti jedan od onih "malih" promjena u obliku tog, nažalost, breaks a naming convention I adopted with it two weeks ago. Pomislio sam:, "Netko ide gledati na tu stvar godina od sada i reći, 'Ono što je Pavao razmišljao? By Jove, njegova imenovanja konvencija nema smisla!"
Shvatio sam da sam mogao stvoriti pogled na obrascu za to, a zatim, još jednom, realized that I could have been doing something like this all along. I added a “Developer Notes” view to the InfoPath form as such:
Ja sam konfiguriran obrasca tako da korisnici ne mogu doći do tog gledišta i stoga, it’s only visible with the InfoPath client in design view. Now I feel a little inoculated against some future unknown developer looking at my form and thinking bad thoughts about me. Phew!
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
Čini mi se da ide kroz InfoPath faze gdje, kao grom iz vedrog neba, I’m crafting a bunch of forms. My fingers learn how to use the tool well and then I go through nine month drought and have to learn it all over again.
Ja sam u sredini InfoPath fazi, a ja sam stvaranje InfoPath obrasce s puno pregleda. Jedna stvar koju vjerojatno primijetiti je da InfoPath 2007 client shows views in alphabetical order. This is a real nuisance some times. My best technique these days is to prepend a number to the view name so that they always show in the order I want, kao što je prikazano ovdje:
I wish I had been doing this all along.
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
Radio sam na nekim InfoPath stvara ovaj tjedan u MOSS u FBA okoliš i naučio, kad sam otišao za implementaciju obrasce za proizvodnu okolinu s FBA zoni koja korisničko ime() function function does not work. I was using it to generate unique file names.
Dobro, da funkcija ne radi u FBA okoliš (barem, ne iz kutije). I, na razmišljanje, koristeći korisničko ime na način da sam planirao ne bi zasigurno jedinstven naziv u svakom slučaju.
Moje rješenje je koristiti sada() function and a rule that fires on loading of the form. I assign the file name to data element when it’s blank:
The advantage of this approach is that the file name is set only once. (Ja to ne pokazuju u screen shot, ali staviti stanje na pravilo samo vatru kad je "myFilename" je prazan). I used to set the file name at the data source level. Typically, Ja bih nešto učiniti (loše) ovako:
Problem je u tome da ako korisnik otvori obrazac na ponedjeljak i korisnik B ga mijenja u utorak, ćete završiti s dvije različite oblike od dvije različite korisnici ga spasio s različitih korisničkih imena.
Tako, kao neugodno kao FBA može biti u cjelini i InfoPath posebno, to me ponovno mislim mala, ali jako je važno tehnički detalji i pristup koji ja ne bih učinio drugačije!
</kraj>
Slijedite me na Twitter-u http://www.twitter.com/pagalvin
Tu je uobičajena poslovna scenarij kao što je ovaj:
Ovaj primjer office.microsoft.com opisuje kako stvoriti poseban "pogled" and mark the whole view as read-only. This is a workable approach but has the drawback that you’ve effectively created two entire versions of the same form and must now keep them in sync manually. If you add a field to the editable view, you must then add it to the non-editable view as well. Tijekom vremena, s različitim programere, there can be some divergence.
Ova alternativa bi mogli raditi bolje u nekim slučajevima:
The drawback to this approach is that all the fields will still be editable on the screen. The user can get a false impression that they can actually change content. You can mitigate that by putting in some text that the form is disabled, eventualno u velikim crvenim slovima na vrhu stranice.
U jednom projektu, Napravio sam "workflow status" pogled. As the workflow progressed, it would update specific status fields that had been promoted from the form. When the user opened the form, "otvoreni oblik" vladati automatski prebacio na tom pogledu i korisnik imao lijepu sažetak statusa.
</kraj>
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>