Kateqoriya Arxivləri: InfoPath 2007 // Formaları Server

Sadə Hit: SharePoint bir SPListItem birbaşa InfoPath XML Oxu

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 (olan yalnız XML faylları, bunu həqiqətən çox asandır).

Mən layihənin inşası isə, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. Lakin, 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. Lakin, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:

/// Burada Class definition heyəti, o cümlədən:
xüsusi SPFile mySharePointFile; /* Bir SPList hissəsi */
// Daha kodu buraya və biz sinif metodu daxili gedir:
XmlTextReader textReader;
textReader = yeni XmlTextReader(mySharePointFile.OpenBinaryStream());

= textReader.WhitespaceHandling WhitespaceHandling.Yox;

textReader.Read();

// Bu node dəyər varsa,

isə (textReader.Read())
{

… and so on and so forth …

Yuxarıda onlar əsas bit biz OpenBinaryStream vasitəsilə birbaşa InfoPath oxuya bilərsiniz ki,() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.

</son>

Blog abunə.

Da Twitter məni izləyin http://www.twitter.com/pagalvin

Technorati Tags:

Program InfoPath formalarından Əlavələr Elde (Onların adları, o cümlədən!)

I have an expense entry solution for a client that leverages InfoPath and workflow. At one point during the approval process, Mən ki, yaxşı InfoPath məlumatların bütün həmçinin əlavə özləri olan bir e-mail yaratmaq lazımdır (köksünü ötürmək) kimsə bir Oracle bazasında tətbiq o məlumatlar və özünüz yeniden açarı bilər.

It’s not very difficult to get at or parse the InfoPath form. I didn’t know how to handle the attachments, lakin. After an hour or two of poking around the Internets (bir əbədiyyət!) Bu maddə tapılıb: http://support.microsoft.com/kb/892730

It provide some handy code to extract the attachment from a node in the form. (Hala node və bütün tapmaq lazımdır, lakin yalnız XML analiz var).

Okt base64-kodlanmış olduğunu və ilkin yalnız bu base64 data çıxarılmasının yolu düşdü, decoding it and saving it. Lakin, Mən tez Mən yuxarıda qeyd olunan maddə aşkar qədər fayl adı özü ala bilmirdim həyata.

Mən, həqiqətən, çox erkən aşkar, lakin mən onun split şəxsiyyət tərəfindən verilib. Bir tərəfdən, the article *says* it’s good for InfoPath 2007. Hələ, kodu və təlimatların Visual Studio haqqında bütün var 2003 və InfoPath istinadlar 2003.

Aşağı xətt, təmin məqalə mənim üçün də çalışır ki, kod (indiyə qədər). I can get my InfoPath form, Hesab edirəm ki, təhlil etmək bilər, I can find and decode the attachment and I know its name. What more can one ask of one’s life?

</son>

Blog abunə.

Da Twitter məni izləyin http://www.twitter.com/pagalvin

Technorati Tags: ,,

Sizin SharePoint mühit qeyri-sağlam bir TAD ola endişeleniyorsanız, mənə gidermek edək ki, sağlamlıq çek ilə.

Bir FBA Environment InfoPath ilə təsdiq Qrup idarə

Mən identifikasiyası əsasında formaları InfoPath istifadə edərək həyata keçirilməsi üçün lazım olan xərcləri təsdiq prosesi (FBA) formaları xidmətlərindən istifadə ətraf mühit (web-based InfoPath).

İki təsdiq qrup və proses bu kimi çalışır:

  • İstifadəçi xərc hesabat doldurur və təsdiq üçün təqdim edir.
  • Bu birinci səviyyəli onaylayan qrupuna bir e-poçt tetikler.
  • Birinci səviyyəli onaylayan hesabat nəzərdən keçirir və təsdiq və ya təkzib edir.
  • Birinci səviyyəli şəxs onu təsdiq edin, Sistem ikinci səviyyəli onaylayan bildirir.

Şeyi InfoPath tərəfində, Mən istifadəçi həmin təsdiq qruplarından biri olan üzvü olub əsasında görünür / gizlət ki, müxtəlif bölmələr var.

Bir FBA mühitdə istifadəçi adı() funksiyası həmişə boş qaytarır, qubarlı. What I’ve done is set up a a custom list called “Approval Groups”.

Mən siyahısına heç bir əlavə sütunları əlavə etməyin.

Şəklində açılır zaman, bu kimi bir qayda var:

image

Bu "bir sahədə dəyəri müəyyən" burada:

image

Bu əsasən söylədiyini: Təsdiq qrup xüsusi siyahı sorğu və Ü Title dəyəri = "NORDIC" hər hansı bir sıra axtarır ki, sorğu filtre.

Ki, bir dəyər döndürürse, 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, cari istifadəçi həmin maddə müvafiq təhlükəsizlik çıxışı yoxdur, əgər sorğu qaytarmazlar, 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.

</son>

Blog abunə.

Da Twitter məni izləyin http://www.twitter.com/pagalvin

Technorati Tags: ,

InfoPath // Şəklində System.Xml.XmlException verilməsi "Unhandled istisna bir izahat: Fayl gözlənilməz sonunda təhlil Adı meydana gəldi isə. "

Mən InfPath forması üzərində işləyir və köhnə dost qarşı qaçdı edilib, Şəklində System.Xml.XmlException verilməsi "Unhandled istisna: Fayl gözlənilməz sonunda təhlil Adı meydana gəldi isə. "

This happened to me a long time ago and I don’t know what exactly I did to resolve it. Honestly, Mən yeni layihə keçid ki, hesab edirəm ki, və bu bir həll görmedin (mənim dəyişdirmə ki, baş ağrısı ilə məşğul idi). I do remember it was a devil of a problem. I spent several unsuccessful days dealing with it. Since then, Mən bu son bir il ərzində ən azı bir dəfə MSDN forumlarda gəlib görüldü və həqiqətən bir cavab gördüm heç vaxt sonra.

Mən xoşbəxtlikdən bu gün və bu dəfə hit , 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.

Mənə gəldikdə isə, problem bu addımlar səbəb olub:

  1. Mətn sahəsində bir məlumat mənbəyi üçün yeni element əlavə et.
  2. Şəklində üzərinə düşmək.
  3. Siyahıdan bir damla onu ekran dəyişdirin.
  4. SharePoint xüsusi siyahısından onun dəyərləri çəkmək siyahısı açılır deyin.

O addımlar bir problem və ya bəlkə səbəb əgər Bilmirəm, birtəhər siyahısında özlüyündə məlumatlar problem. I’m going to experiment a bit and see if I can nail downt he parameters of this with any more detail.

</son>

Blog abunə.

Da Twitter məni izləyin http://www.twitter.com/pagalvin

Technorati Tags:

Sizin InfoPath Formaları Inside Developer Qeydlər yayımla

Mən hələ InfoPath Formaları dünyada yaşayan alıram və mən ki, bir forma bu "kiçik" dəyişikliklər bir etmək üçün lazım, təəssüf ki,, breaks a naming convention I adopted with it two weeks ago. Özümə düşündüm, "Kimsə artıq bir il bu şey baxmaq və demək gedir, 'Nə Paul düşünürdüm? By Jove, onun adlandırma konvensiya heç bir mənada edir!"

Mən sonra mən bu üçün forma baxımından yarada bilər ki, həyata keçirilir və, bir daha, 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

Istifadəçilər bu fikri almaq və buna görə də bilməz ki, mən şəklində yapılandırılmış sonra, 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!

</son>

Blog abunə.

Da Twitter məni izləyin http://www.twitter.com/pagalvin

Technorati Tags:

InfoPath Views idarə

Mən InfoPath mərhələləri yerləşir keçmək görünür, Mavi həyata, 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.

Mən InfoPath mərhələsi ortasında Ben və fikir bir çox InfoPath formaları yaratmaq alıram. Siz yəqin ki, bildiriş bir şeydir ki, 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, burada təsvir kimi:

image

I wish I had been doing this all along.

</son>

Blog abunə.

Da Twitter məni izləyin http://www.twitter.com/pagalvin

Technorati Tags:

InfoPath Form Hizmetleri, Əsaslı Authentication təşkil edir (FBA) və unikal fayl adları

Mən bu həftə bir FBA mühitdə MOSS ildə təşkil bəzi InfoPath üzərində işləyir və öyrənilmiş etdik, Mən FBA zonası ilə istehsal mühitə formaları dağıtmak üçün getdiyi ki, istifadəçi adı() function function does not work. I was using it to generate unique file names.

Yaxşı, that function doesn’t work in an FBA environment (azı, not out of the box). Və, upon reflection, using username in the way I had planned wouldn’t have guaranteed a unique file name in any event.

My solution was to use the now() 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. (I don’t show it in the screen shot, but put a condition on the rule to only fire when “myFilename” is blank). I used to set the file name at the data source level. Typically, I would do something (bad) like this:

image

The problem with that is that if user A opens the form on Monday and the user B changes it on Tuesday, you’ll end up with two different forms since two different users saved it with different user names.

Belə, as annoying as FBA can be in general and with InfoPath in particular, it made me re-think a small but really important technical detail and approach that I wouldn’t have done otherwise!

</son>

Blog abunə.

Da Twitter məni izləyin http://www.twitter.com/pagalvin

Technorati Tags:

Sadə və sadə: InfoPath Form Yalnız oxuyun olun (MOSS ildə InfoPath Formaları Xidmətləri)

Bu kimi ümumi bir iş ssenari var:

  • İstifadəçi InfoPath form doldurduğu.
  • Şəklində təqdim.
  • Uzun süren iş prosesi başlayıb.
  • Də iş çalışırken, biz hər şəklində content dəyişdirmək istəmirəm.

Bu office.microsoft.com misal 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. Zamanla, müxtəlif developers ilə, there can be some divergence.

Bu alternativ bəzi hallarda daha yaxşı işləmək bilər:

  • Add a new field to the form called "IsEditable".
  • Əsl öz default dəyəri.
  • MOSS üçün nəşriyyat zaman təşviq.
  • Ki, iş-ci ildə, saxta üçün IsEditble dəyəri müəyyən.
  • Şəklində geri qayıt.
  • Add a rule that "upon open of the form", IsEditable yalan zaman Saxla düyməsini aradan.

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, bəlkə Saytın üstünde böyük qırmızı hərflərlə.

Bir layihə, I created a "workflow status" keçirmək. 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" ki, görünüşü keçid və istifadəçi bir gözəl az xülasə statusuna malik avtomatik idarə.

</son>

Blog abunə.

Bir InfoPath Form istifadəçi ID əsaslanır Məlumatlarına bax Switch

Biz yeni kirayə yardım üçün bir çox views ilə InfoPath form inkişaf etmiş / on-boarding process. When the company hires a new person, İT şöbəsi və digər qruplar hərəkətə keçməsi lazımdır (əmək haqqı qurmaq, müvafiq ərizə çıxışı təmin, bir masa tapmaq, və s.). We use on form but a different view of the form for each of those functions.

At this company, most of the people involved in the business process are IT-savvy, so when they access the form, their default view is a "menu" view with buttons that direct them to their specific function. Lakin, we needed to simplify things for the new hire’s direct manager. This person should not see any of the IT related stuff. Faktiki olaraq, she should see just one view of the form and not even have an option to see the other views.

Bizim halda, that direct manager’s account is directly tied to the form courtesy of a contact selector (which I am always wanting to call a "people picker" for some reason).

The steps are as follows:

1. In design mode, go to Tools -> Form Options -> Open and Save.

2. Select "rules".

3. Create a new rule whose action is "switch to view" and whose condition leverages the userName() funksiyası.

İstifadəçi adı() returns the "simple" user name without the domain. If I log into SharePoint with credentials "domain\pagalvin", İstifadəçi adı() 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 (in my environment anyway) returns the domain and user ID, as in "domain\pagalvin". This prevents us from doing a straight-forward equality condition since AccountID ("domain\pagalvin") will never equal userName() ("pagalvin").

We can get around this using the "contains" operator: AccountID contains userName().

We can take it further and pre-pend a hard-coded domain in front of the userName() function to get our equality check and eliminate the risk of a false positive on the contains operator.

We would have REALLY like to automatically switch view for other users based on their AD security group membership. Məsələn, when a member of the "IT Analytics" group accesses the form, 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", pass it the userName() and return back true or false. Does anyone have any other, more clever idea? Is there any SharePoint function we can leverage from InfoPath to make that determination?

</son>

Technorati Tags: