June: InfoPath 2007 // Formae Server

Velox Hit: Lectio InfoPath XML an immediate a SPListItem in 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 (quae iusta sunt XML files, ita suus vere satis facile).

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

/// Class definition stuff here, possidet:
privatis SPFile mySharePointFile; /* Part of an SPList */
// More code goes here and inside a method of the class we have:
XmlTextReader textReader;
textReader = novum XmlTextReader(mySharePointFile.OpenBinaryStream());

textReader.WhitespaceHandling = WhitespaceHandling.Nulla;

textReader.Read();

// If the node has value

Dum (textReader.Read())
{

… and so on and so forth …

They key bit above is that we can read the InfoPath directly via the OpenBinaryStream() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags:

De attachiamentis Programmatically extrahendis species InfoPath (Nomina Complectens!)

I have an expense entry solution for a client that leverages InfoPath and workflow. At one point during the approval process, Omne opus quod generat Suspendisse ut ipsum affectiones boni sunt ut InfoPath (gementium) someone can take that data and manually re-key it into an Oracle database application.

It’s not very difficult to get at or parse the InfoPath form. I didn’t know how to handle the attachments, autem. After an hour or two of poking around the Internets (an eternity!) I found this article: http://support.microsoft.com/kb/892730

It provide some handy code to extract the attachment from a node in the form. (You still need to find the node and all that, but that’s just XML parsing).

I know that the attachment is base64-encoded and I originally went down the path of just extracting the the base64 data, decoding it and saving it. Autem, I quickly realized I didn’t know how to get the file name itself until I found the aforementioned article.

I had actually found that quite early, but I was put off by its split personality. On the one hand, the article *says* it’s good for InfoPath 2007. Tamen, the code and instructions are all about Visual Studio 2003 and references to InfoPath 2003.

Imo linea, the code that article provided is working well for me (Adeo). I can get my InfoPath form, I can parse it, I can find and decode the attachment and I know its name. What more can one ask of one’s life?

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags: ,,

If you’re worried that your SharePoint environment may be a tad unhealthy, let me help you fix that with a health check.

Approbatio vero moderandis coetus InfoPath in FBA Opera

Habeo sumptu approbatione processus necessaria ad peragendam usura InfoPath in formis fundentur authenticas (FBA) environment utendi formis servicia (dicentur telam InfoPath).

Ibi sunt duo coetus processus operatur huiusmodi approbatione:

  • User implet sumptui fama subiicit approbatione.
  • Quod ad primum gradum probatorem coetus saltem an email.
  • Primo gradu et approbat, vel consideret abnegat fama probatorem.
  • Si primo gradu illud acceptatur, secundo ratio notifies probatorem.

Ex parte rerum InfoPath, Habeo diversas partes abscondam / apparent utrum user fundatur in est unum membrum coetus eorum approbatione.

In environment FBA nomen usoris() functio semper redit blank, miserabile. What I’ve done is set up a a custom list called “Approval Groups”.

Columnas quoque addas non album.

Cum forma recludit, habet hoc sicut a regula:

image

Per "agrum profectus est scriptor valor" Adest:

image

Dicens: Hoc est basically: Quaero mos coetus, approbante album et spurcamen quod vultus pro query, a versu ubi Title scriptor valor = "Consilium".

Si redit, ut valor aliquis, 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, si user non current accessum habent ad congruam cautionem item ut tum query non resalutaturum, 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.

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags: ,

InfoPath // Una ratio est quia "cum exceptione INTRECTATUS reddita forma System.Xml.XmlException: Nomen vero factum parsing improviso finis file. "

Ego est operantes in hodierna InfPath forma et cucurrit adversus amicum antiquum, "INTRECTATUS exceptione cum reddita forma System.Xml.XmlException: Improviso finis file dum parsing nomen factum. "

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.

In meam, 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.

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags:

Nota embed elit intus species InfoPath

Aliquam InfoPath adhuc in mundum et ego unum opus eorum "parva" forma mutationum, infeliciter, breaks a naming convention I adopted with it two weeks ago. I thought to myself, "At si quod est ad annum iam dicere, 'Quid Paulus existimans? By Jove, Nominatio vero sensu caret suo conventu!"

Ego cognovi quod hoc facit propter formam et, iterum, 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

Ive forma configured ut users potest non adepto ad istam sententiam, et ideo, 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!

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags:

Felis Nullam InfoPath

Videor ut per augmenta ubi InfoPath, de hyacintho, 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.

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags:

Forma InfoPath Sevices, Substructio formae authenticas (FBA) et unicum Nomina fasciculorum

Ive 'been opus in aliquo InfoPath id format in Hebdomadam musco FBA environment et didicérunt, quando ibam ad explicandam productionem formarum environment cum FBA quod zonam username() function function does not work. I was using it to generate unique file names.

Bene, id munus non operetur in environment FBA (saltem, non ex arca archa). Et, reflexiones, meditatus in via per fermentum amet feugiat non utique File name.

Mea solutio autem uti nunc() 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. (In eget neque tincidunt ostendere, sed ponere statum in solum ignis cum imperium "myFilename" est blank). I used to set the file name at the data source level. Typically, Volui facere aliquid (malum) sicut est hodie:

image

Forsit est ut si A user aperiat formam die lune et die martis commutat ipsum in user B, at tandem cum duobus aliis modis defendere dolor sit amet duobus nominibus.

Ita, ut molestus ut FBA potest quid in genere et in specie cum InfoPath, Aenean eget magna sed re ipsa fecit me arbitror, ​​ut aliter facere non ipsum felis, et venite!

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags:

Vivos et Simplex: Facies et forma InfoPath tantum legere, (InfoPath species Services musco)

Illic 'a vulgaris negotium hujusmodi missionem:

  • User implet quasi forma InfoPath.
  • Forma suscipitur.
  • Diu procul fluxum workflow processus amet.
  • Dum currit workflow, Mutari nolimus quemquam formam dolor.

Hoc exemplum office.microsoft.com 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. Super tempus, cum diversis tincidunt, there can be some divergence.

Vel hoc posset operari in quibusdam meliora:

  • Add a new field to the form called "IsEditable".
  • Verum pone eius defaltam ad valentiam.
  • Promoveant cum publicantes MUSCUS.
  • In workflow, statuet pretium IsEditble falsae.
  • Revertere ad formam.
  • Add a rule that "upon open of the form", disable vestri falsum est, nisi ipsum cum IsEditable.

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, Page per litteras summum magnum rubrum possibile,.

Una project, I created a "workflow status" considerabit. 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" regere automatically switched ut usura visum et habuit a nice status paulo summary.

</finem>

Scribet ad mea blog.

Transibit View View Ex User ID In InfoPath Forma

Nos a succrevit an InfoPath forma cum multiplex views sustinere novum mercedem / on-boarding process. When the company hires a new person, IS department et aliis coetibus opus ad actio (posuit stipendia, enable accessum ad conveniens applications, locant a desk, etc). We use on form but a different view of the form for each of those functions.

Ad hoc comitatu, maxime personarum in negotium processus sunt IT-sagaces, ita cum obvius forma, eorum Nubila est a "menu" view with buttons that direct them to their specific function. Autem, we needed to simplify things for the new hire’s direct manager. This person should not see any of the IT related stuff. In facto, videret unius formae secundum alias sententias videre nec optare.

In nobis, quod directe procurator scriptor propter directe ligatum ad formam humanitatem de a contactus electrix (quod sum semper volens vocant a "populus picker" enim causa).

Vestigia sunt:

1. In consilium modum, ad Exodus -> Forma Bene -> Aperire et salvum.

2. Lego "praecepta".

3. Novum regula cuius actio est "transibit ad considerandam" et cuius statu Aenean in Username() munus.

Username() redit "simplex" user name without the domain. If I log into SharePoint with credentials "domain\pagalvin", Username() redire "cervicalia".

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 mea environment usquam) redit in dominico et user ID, as in "domain\pagalvin". This prevents us from doing a straight-forward equality condition since AccountID ("Domain cervical") numquam aequare Username() ("Pillow").

Uti possumus in circuitu "continet" operante: AccountID continet Username().

Nos potest ulterius et pre-PROMOVEO durus coded dominico in fronte Username() elit ut nostri aequalitas reprehendo et eliminare periculo a falsa positivum in continet operante.

We would have REALLY like to automatically switch view for other users based on their AD security group membership. Verbigratia, cum membrum "IT Analytics" coetus aditus forma, automatically switch to the IT Analytics view. We didn’t have time to implement it, sed primum cogitatio est creare telam ministerium quod esset modus sicut "IsMemberOfActiveDirectorySecurityGroup", transire in Username() and return back true or false. Does anyone have any other, magis callidus idea? Is there any SharePoint function we can leverage from InfoPath to make that determination?

</finem>

Technorati Tags: