jamii Archives: InfoPath 2007 // Fomu Server

Haraka Hit: Kusoma InfoPath XML moja Kutoka SPListItem katika SharePoint

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 (ambayo ni haki ya XML files, hivyo ni kweli kabisa rahisi).

Wakati mimi ilikuwa kujenga mradi, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. Hata hivyo, 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. Hata hivyo, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:

/// Hatari ufafanuzi mambo hapa, ikiwa ni pamoja na:
binafsi SPFile mySharePointFile; /* Sehemu ya SPList */
// Zaidi ya kanuni huenda hapa na ndani ya njia ya darasa tuna:
XmlTextReader textReader;
textReader = mpya XmlTextReader(mySharePointFile.OpenBinaryStream());

textReader.WhitespaceHandling = WhitespaceHandling.Hakuna;

textReader.Read();

// Kama nodi ina thamani

wakati (textReader.Read())
{

… and so on and so forth …

Wao muhimu kidogo hapo juu ni kwamba tunaweza kusoma InfoPath moja kwa moja kupitia OpenBinaryStream() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati:

Programmatically madini Attachments Kutoka Fomu InfoPath (Ikiwa ni pamoja na Majina yao!)

I have an expense entry solution for a client that leverages InfoPath and workflow. At one point during the approval process, Mimi haja ya kuzalisha email kwamba ina wote wa data kwamba nzuri InfoPath vilevile attachments wenyewe, ili (wanaougua) mtu anaweza kuchukua data kwamba na manually re-ufunguo ndani ya maombi database Oracle.

It’s not very difficult to get at or parse the InfoPath form. I didn’t know how to handle the attachments, hata hivyo. After an hour or two of poking around the Internets (milele!) Nimeona makala hii: http://support.microsoft.com/kb/892730

It provide some handy code to extract the attachment from a node in the form. (Bado unahitaji kutafuta nodi na wote, lakini hiyo ni XML parsing).

Najua kwamba attachment ni Base64-encoded na mimi awali akaenda chini njia ya kuchimba tu data Base64, decoding it and saving it. Hata hivyo, Mimi haraka waligundua sikujua jinsi ya kupata jina la faili yenyewe mpaka nimeona makala aforementioned.

Nilikuwa kweli kupatikana kwamba mapema kabisa, lakini mimi nilikuwa kuweka mbali na kupasuliwa utu wake. Kwa upande mmoja, the article *says* it’s good for InfoPath 2007. Hata hivyo, kanuni na maelekezo yote kuhusu Visual Studio 2003 na marejeo ya InfoPath 2003.

Bottom line, kificho kwamba makala zinazotolewa ni kazi vizuri kwa ajili yangu (hadi sasa). I can get my InfoPath form, Siwezi Hazrat ni, I can find and decode the attachment and I know its name. What more can one ask of one’s life?

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati: ,,

Kama wewe ni wasiwasi kwamba SharePoint yako mazingira inaweza kuwa mbaya tad, napenda kukusaidia kurekebisha kwamba na kuangalia afya.

Kusimamia Vikundi kibali na InfoPath katika Mazingira FBA

Nina idhini gharama mchakato kwamba mimi haja ya kutekeleza kwa kutumia InfoPath katika aina ya msingi uthibitishaji (FBA) mazingira kwa kutumia huduma ya aina (mtandao msingi InfoPath).

Kuna mambo mawili ya idhini ya makundi na mchakato wa kazi kama hii:

  • Mtumiaji hujaza ripoti ya gharama na elekeza ni kwa idhini.
  • That triggers an email to first level approver group.
  • First level approver reviews and approves or denies the report.
  • If first level person approves it, system notifies second level approver.

On the InfoPath side of things, I have different sections that hide/appear based on whether the user is a member of one of those approval groups.

In an FBA environment the username() function always returns blank, cha kusikitisha. What I’ve done is set up a a custom list called “Approval Groups”.

I don’t add any additional columns to the list.

When the form opens up, it has a rule like this:

image

The “set a field’s value” is here:

image

This is basically saying: Query the approval group custom list and filter that query by looking for any row where Title’s value = “NORDIC”.

If that returns any value, 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, if the current user doesn’t have appropriate security access to that item then the query won’t return it, 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.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati: ,

InfoPath // Maelezo kwa moja ubaguzi "unhandled wakati utoaji fomu System.Xml.XmlException: Zisizotarajiwa mwisho wa faili wakati parsing Jina imetokea. "

Mimi nilikuwa nafanya kazi kwenye fomu leo ​​InfPath na mbio juu ya rafiki wa zamani, "Unhandled ubaguzi wakati utoaji fomu System.Xml.XmlException: Zisizotarajiwa mwisho wa faili wakati parsing Jina imetokea. "

This happened to me a long time ago and I don’t know what exactly I did to resolve it. Honestly, Nadhani kwamba mimi alikuwa kipindi cha mpito kwa mradi mpya na kamwe kuona hii moja kutatuliwa (replacements yangu alikuwa na kukabiliana na maumivu ya kichwa kwamba). I do remember it was a devil of a problem. I spent several unsuccessful days dealing with it. Since then, Nimeona hii kuja kwenye vikao MSDN angalau mara moja kwa zaidi ya mwaka jana na kamwe kweli kuona jibu kwa ajili yake.

I hit ni leo na bahati nzuri wakati huu , 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.

Katika kesi yangu, tatizo ulisababishwa na hatua hizi:

  1. Kuongeza kipengele mpya chanzo data kama shamba Nakala.
  2. Kushuka kwenye fomu.
  3. Mabadiliko ya kuonyesha ni katika kushuka chini orodha.
  4. Kuwaambia kushuka chini orodha ya kuvuta maadili yake kutoka kwenye orodha SharePoint desturi.

Sijui kama wale hatua kusababisha tatizo au labda, namna fulani data katika orodha yenyewe ni tatizo. I’m going to experiment a bit and see if I can nail downt he parameters of this with any more detail.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati:

Embed Vidokezo Developer Ndani ya Fomu yako InfoPath

Mimi bado wanaishi katika dunia InfoPath Fomu na mimi zinahitajika kufanya moja ya mabadiliko hayo "ndogo" kwa ajili ya kwamba, kwa bahati mbaya, breaks a naming convention I adopted with it two weeks ago. Mimi nilidhani, "Mtu ni kwenda kuangalia kitu mwaka huu kutoka sasa na kusema, 'Je, Paulo alikuwa kufikiri? By Jove, kumtaja mkataba wake haina mantiki!"

Nilitambua kwamba inaweza kujenga mtazamo juu ya fomu kwa ajili ya hii na kisha, mara nyingine tena, realized that I could have been doing something like this all along. I added a “Developer Notes” view to the InfoPath form as such:

image

Nimekuwa kimeundwa fomu ili watumiaji hawawezi kupata maoni kuwa na hivyo, 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!

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati:

Kusimamia Views InfoPath

Mimi kuonekana kwenda kwa njia ya awamu InfoPath ambapo, nje ya bluu, 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.

Mimi nina katikati ya awamu InfoPath na mimi nina kujenga aina InfoPath na mengi ya maoni. Jambo moja pengine taarifa ni kwamba 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, kama inavyoonyeshwa hapa:

image

I wish I had been doing this all along.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati:

InfoPath kidato huduma za, Hutengeneza Uthibitishaji Based (FBA) na kipekee Picha Majina

Nimekuwa kazi juu ya InfoPath baadhi hutengeneza wiki hii katika MOSS katika mazingira FBA na kujifunza, wakati mimi akaenda kupeleka fomu kwa mazingira ya uzalishaji na ukanda FBA kwamba jina la mtumiaji() function function does not work. I was using it to generate unique file names.

Vizuri, kwamba kazi hana kazi katika mazingira FBA (angalau, si nje ya boksi). Na, juu ya tafakari, kutumia jina katika njia nilipanga bila kuwa na uhakika kipekee faili jina katika tukio lolote.

Ufumbuzi yangu ilikuwa kutumia sasa() function and a rule that fires on loading of the form. I assign the file name to data element when it’s blank:

image

image

The advantage of this approach is that the file name is set only once. (Mimi si kuonyesha kuwa katika risasi screen, lakini kuweka hali ya juu ya utawala kwa moto tu wakati "myFilename" ni tupu). I used to set the file name at the data source level. Typically, Napenda kufanya kitu (mbaya) kama hii:

image

tatizo na kwamba ni kwamba kama mtumiaji kufungua fomu Jumatatu na B mtumiaji hulibadilisha Jumanne, kuishia na aina mbili tofauti tangu mbili watumiaji mbalimbali kuokolewa ni pamoja na majina tofauti ya mtumiaji.

Hivyo, kama annoying kama FBA unaweza kuwa kwa ujumla na kwa InfoPath hasa, amenifanya kufikiria upya ndogo lakini kwa kweli muhimu ya kiufundi undani na mbinu kwamba mimi bila kuwa na kosa vinginevyo!

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati:

Haraka na rahisi: Kufanya Fomu InfoPath Kusoma tu (InfoPath Fomu Huduma katika MOSS)

Kuna kawaida ya biashara ya mazingira kama hii:

  • Mtumiaji hujaza fomu InfoPath.
  • Elekeza fomu.
  • Muda mrefu-mbio workflow mchakato linaanza.
  • Wakati workflow ni mbio, hatutaki mtu yeyote na mabadiliko ya maudhui ya fomu.

Hii office.microsoft.com mfano describes how to create a separate "view" 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. Over time, na watengenezaji tofauti, there can be some divergence.

Mbadala hii inaweza kufanya kazi vizuri zaidi katika baadhi ya kesi:

  • Add a new field to the form called "IsEditable".
  • Kuweka default thamani yake kwa kweli.
  • Kukuza ni wakati wa kuchapisha MOSS.
  • Katika workflow, kuweka thamani ya IsEditble ya uongo.
  • Kwenda nyuma ya fomu.
  • Add a rule that "upon open of the form", afya ya kifungo yako ila wakati IsEditable ni ya uongo.

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, pengine katika barua kubwa nyekundu katika juu ya ukurasa.

Katika mradi mmoja, I created a "workflow status" mtazamo. As the workflow progressed, it would update specific status fields that had been promoted from the form. When the user opened the form, the "open form" utawala wa moja kwa moja switched kwa mtazamo kwamba alikuwa na user nzuri kidogo muhtasari hali ya.

</mwisho>

Kujiunga na blog yangu.

Kubadili View View Kulingana na ID mtumiaji Katika kidato InfoPath

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>

Tags technorati: