Цатегори Арцхивес: ИнфоПатх 2007 // Формс Сервер

Поређење осетљива на величину слова у програму ИнфоПатх

I wrote an article for СхареПоинтБриефинг.цом and they put it up live today.

Ево теасер:

image

Цхецк ит оут.

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на 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 (који су само КСМЛ датотеке, па то је заправо прилично лако).

Док сам је изградњу пројекат, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. Међутим, 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. Међутим, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:

/// Класа дефиниција ствари овде, укључујући:
приватан СПФиле миСхареПоинтФиле; /* Део СПЛист */
// Још код иде овде и унутар метода класе имамо:
КсмлТектРеадер ТектРеадер;
ТектРеадер = нови КсмлТектРеадер(миСхареПоинтФиле.ОпенБинариСтреам());

тектРеадер.ВхитеспацеХандлинг = ВхитеспацеХандлинг.Ниједан;

тектРеадер.Реад();

// Ако чвор има вредност

док (тектРеадер.Реад())
{

… and so on and so forth …

Суштина је нешто изнад да можемо прочитати ИнфоПатх директно преко ОпенБинариСтреам() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на 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, Морам да генерише е-поште која има све те добре ИнфоПатх података, као и саме прилоге, тако да (уздах) неко може да да податке и поново ручно кључ је у Орацле базе података апликације.

It’s not very difficult to get at or parse the InfoPath form. I didn’t know how to handle the attachments, међутим. After an hour or two of poking around the Internets (вечност!) Нашао сам овај чланак: http://support.microsoft.com/kb/892730

It provide some handy code to extract the attachment from a node in the form. (Ви и даље треба да пронађе чвор и тако то, али то је само КСМЛ).

Знам да је прилог басе64-кодирана и сам првобитно отишао стазом само издвајању у басе64 податке, decoding it and saving it. Међутим, Брзо сам схватио да нисам знао како да се на име датотеке се док сам нашао поменуту чланак.

Заправо је сам открио да веома рано, али је одложен њен расцеп личности. У једну руку, the article *says* it’s good for InfoPath 2007. Још, код и инструкције су све о Висуал Студио 2003 и референце за ИнфоПатх 2003.

Боттом лине, код који чланак под условом добро ради за мене (досада). I can get my InfoPath form, Могу да рашчланимо, I can find and decode the attachment and I know its name. What more can one ask of one’s life?

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на http://www.twitter.com/pagalvin

Ако сте забринути да ваше окружење СхареПоинт буде за нијансу нездрава, дозволите ми да вам помогне да решите тај са здравственог прегледа.

Управљање Одобрење групе са ИнфоПатх у једном ФБА средине

Имам трошковима процес одобрења која ми је потребна за имплементацију помоћу програма ИнфоПатх у форми потврда идентитета заснована на (ФБА) окружење коришћења услуге образаца (веб базирани ИнфоПатх).

Постоје две групе одобравање и процес иде овако:

  • Корисник попуњава извештаја о трошковима и доставља га на усвајање.
  • То изазива емаил на првој Аппровер нивоу групе.
  • Први ниво аппровер разматра и усваја или одбија извештај.
  • Ако први ниво особа га одобри, Систем обавештава други ниво Аппровер.

На ИнфоПатх страни ствари, Имам различите секције која крију / појављују основу тога да ли је корисник члан једне од тих група одобрења.

У окружењу ФБА корисничко име() функција увек враћа празан, нажалост. What I’ve done is set up a a custom list called “Approval Groups”.

Не додавати додатне колоне на листу.

Када образац отвара, има правило овако:

image

"Сет вредности поља" се овде:

image

То је у основи говори: Упита одобрење групе прилагођену листу и филтер који упит у потрази за било реда, где је вредност титле = "Нордиц".

Ако се то враћа никакву вредност, 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, уколико садашњи корисник нема одговарајући приступ безбедности на ту ставку онда упита га неће вратити, 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.

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на http://www.twitter.com/pagalvin

Тецхнорати Тагс: ,

ИнфоПатх // Једно објашњење за "унхандлед изузетак када се доноси обрасца Систем.Ксмл.КсмлЕкцептион: Неочекивани крај датотеке приликом анализе Име је дошло. "

Радио сам на ИнфПатх обрасцу данас и водио се против старог пријатеља, "Унхандлед изузетак када се доноси обрасца Систем.Ксмл.КсмлЕкцептион: Неочекивани крај датотеке приликом анализе Име је дошло. "

This happened to me a long time ago and I don’t know what exactly I did to resolve it. Honestly, I think that I had been transitioning to a new project and never saw this one resolved (my replacements had to deal with that headache). I do remember it was a devil of a problem. I spent several unsuccessful days dealing with it. Since then, I’ve seen this come up on MSDN forums at least once over the last year and never really saw an answer for it.

I hit it today and fortunately this time , 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.

У мом случају, the problem was caused by these steps:

  1. Add a new element to a data source as a text field.
  2. Drop it onto the form.
  3. Change it’s display into a drop down list.
  4. Tell the drop down list to pull its values from a SharePoint custom list.

I don’t know if those steps cause a problem or maybe, somehow the data in the list itself is a problem. I’m going to experiment a bit and see if I can nail downt he parameters of this with any more detail.

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на http://www.twitter.com/pagalvin

Тецхнорати Тагс:

Додајте белешке програмере Инсиде Иоур ИнфоПатх Формс

Ја сам још увек живе у свету ИнфоПатх обрасце и морао сам да се један од оних "малих" промена у облику који, нажалост, breaks a naming convention I adopted with it two weeks ago. I thought to myself, "Неко ће да погледам у ову ствар годину дана и рећи, "Оно што је Павле мислио? By Jove, his naming convention makes no sense!"

I realized that I could create a view on the form for this and then, поново, 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

I’ve configured the form so that users can’t get to that view and therefore, 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!

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на http://www.twitter.com/pagalvin

Тецхнорати Тагс:

Управљање ИнфоПатх Виевс

Чини ми се да идем кроз ИнфоПатх фаза у којима се, изненада, 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.

I’m in the middle of an InfoPath phase and I’m creating InfoPath forms with a lot of views. One thing you probably notice is that the 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, as illustrated here:

image

I wish I had been doing this all along.

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на http://www.twitter.com/pagalvin

Тецхнорати Тагс:

ИнфоПатх образаца Севицес, Обрасци потврда идентитета заснована на (ФБА) и јединствена имена датотека

Радим на неком ИнфоПатх Формс ове недеље у МОСС у ФБА окружењу и научили, када сам отишао да се распореди образаца у производном окружењу са ФБА зону да корисничко име() function function does not work. I was using it to generate unique file names.

Добро, that function doesn’t work in an FBA environment (најмање, not out of the box). И, 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 (лоше) овако:

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.

Тако, 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!

</крај>

Претплатите се на мој блог.

Следите ме на Туиттер на http://www.twitter.com/pagalvin

Тецхнорати Тагс:

Брза и једноставна: Направите ИнфоПатх образац само за читање (ИнфоПатх Формс Сервицес маховином)

Постоји заједнички пословни сценарио овако:

  • Корисник попуњава се ИнфоПатх образац.
  • Подноси образац.
  • Дуготрајни ток процес почиње.
  • Иако је ток посла ради, ми не желимо никога да промените садржај формулара.

Овај пример оффице.мицрософт.цом 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, са различитим програмерима, there can be some divergence.

Ова алтернатива може радити боље у неким случајевима:

  • Add a new field to the form called "IsEditable".
  • Поставите њену вредност на истина подразумевану.
  • Промоција је приликом објављивања на МОСС.
  • У посла, подесите вредност на лаж ИсЕдитбле.
  • Врати се на обрасцу.
  • Add a rule that "upon open of the form", онемогући Саве дугме када ИсЕдитабле је лажна.

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, можда у великим црвеним словима на врху странице.

У једном пројекту, I created a "workflow status" прегледати. 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" правило се аутоматски пребацује на тај приказ и корисник имао лепу резиме статуса.

</крај>

Претплатите се на мој блог.

Укључи преглед Преглед основу корисничког ИД Ин Ан ИнфоПатх обрасцу

Је Развили смо ИнфоПатх образац са више приказа да подржи нову изнајмљивање / on-boarding process. When the company hires a new person, ИТ одељење и друге групе треба да предузме акцију (подесите плате, омогући приступ одговарајућим апликацијама, пронађите радни сто, итд). 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. Међутим, we needed to simplify things for the new hire’s direct manager. This person should not see any of the IT related stuff. Заправо, she should see just one view of the form and not even have an option to see the other views.

У нашем случају, 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 -> Форма Оптионс -> Open and Save.

2. Select "rules".

3. Create a new rule whose action is "switch to view" and whose condition leverages the userName() функција.

усерНаме() returns the "simple" user name without the domain. If I log into SharePoint with credentials "domain\pagalvin", усерНаме() 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. На пример, 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?

</крај>

Тецхнорати Тагс: