Cartlanna Catagóire: InfoPath 2007 // Foirmeacha Freastalaí

Quick Amas: Léitheoireacht InfoPath XML díreach Ó SPListItem i 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 (a bhfuil ach comhaid XML, mar sin tá sé i ndáiríre éasca go leor).

Cé go raibh mé ag tógáil suas ar an tionscadal, I started by downloading an InfoPath form and saving it to my local hard drive. My c# code was reading directly from that instance. Mar sin féin, 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. Mar sin féin, there’s no need to go through those hoops as you can read it directly from the library. This little snippet shows how:

/// Stuif sainmhíniú Aicme anseo, lena n-áirítear:
príobháideach SPFile mySharePointFile; /* Cuid de SPList */
// Téann cód Níos anseo agus taobh istigh de modh an rang atá againn:
XmlTextReader textReader;
textReader = nua XmlTextReader(mySharePointFile.OpenBinaryStream());

textReader.WhitespaceHandling = WhitespaceHandling.Dada;

textReader.Read();

// Má tá luach an nód

cé go (textReader.Read())
{

… and so on and so forth …

Tá siad beagán eochair thuas gur féidir linn a léamh ar an InfoPath díreach tríd an OpenBinaryStream() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.

</deireadh>

Liostáil le mo bhlag.

Lean mé ar Twitter ag http://www.twitter.com/pagalvin

Clibeanna Technorati:

Programmatically Ceangaltáin Bhaint Ó Foirmeacha InfoPath (Lena n-áirítear a n-ainmneacha!)

I have an expense entry solution for a client that leverages InfoPath and workflow. At one point during the approval process, Is gá dom a ghiniúint r-phost go bhfuil gach ceann de na sonraí InfoPath maith chomh maith leis na ceangaltáin féin ionas go (osna) Is féidir le duine éigin a chur go bhfuil na sonraí de láimh agus ath-eochair sé isteach iarratas bunachar sonraí Oracle.

It’s not very difficult to get at or parse the InfoPath form. I didn’t know how to handle the attachments, áfach,. After an hour or two of poking around the Internets (le eternity!) Fuair ​​mé airteagal seo: http://support.microsoft.com/kb/892730

It provide some handy code to extract the attachment from a node in the form. (Ní mór duit fós a fháil ar an nód agus go léir go, ach sin ach parsáil XML).

Tá a fhios agam go bhfuil an ceangaltán base64-ionchódaithe agus chuaigh mé ar dtús síos an cosán ar díreach aisti na sonraí base64, decoding it and saving it. Mar sin féin, Thuig mé go tapa nach raibh a fhios agam conas a fháil ar an t-ainm comhaid é féin go dtí go bhfuair mé an t-alt thuasluaite.

Chinn mé i ndáiríre go leor go luath, ach bhí chuir mé amach ag a phearsantacht scoilt. Ar thaobh amháin, the article *says* it’s good for InfoPath 2007. Ach, an Cód agus na treoracha ar fad faoi Stiúideo Amharc 2003 agus déanfar tagairtí do InfoPath 2003.

Bottom line, an cód go bhfuil tAirteagal seo ar fáil ag obair go maith dom (go dtí seo). I can get my InfoPath form, Is féidir liom a pharsáil é, I can find and decode the attachment and I know its name. What more can one ask of one’s life?

</deireadh>

Liostáil le mo bhlag.

Lean mé ar Twitter ag http://www.twitter.com/pagalvin

Clibeanna Technorati: ,,

Má tá imní ort nach féidir le do thimpeallacht SharePoint a bheith ina tad unhealthy, lig dom cabhrú leat a shocrú go le seiceáil sláinte.

Bainistíochta Grúpaí Faomhadh le InfoPath i Comhshaoil ​​FBA

Tá mé próiseas ceadaithe chostas gur gá dom a chur i bhfeidhm ag baint úsáide as InfoPath i bhfoirmeacha fíordheimhnithe bunaithe (FBA) timpeallacht ag baint úsáide as seirbhísí foirmeacha (InfoPath bunaithe ar an ngréasán).

Tá dhá ghrúpa cheadú agus a oibríonn an próiseas mar seo:

  • Líonann Úsáideora amach tuarascáil chostas agus cuireann sé le faomhadh.
  • Go triggers ríomhphost chuig an chéad ghrúpa ag faomhadh leibhéal.
  • Athbhreithniú Chéad ceadaitheoirí leibhéal agus ceadaíonn nó séanann an tuarascáil.
  • Má fhormheasann duine chéad leibhéal é a, in iúl córas ag faomhadh an dara leibhéal.

Ar an taobh InfoPath na rudaí, Tá mé rannóga éagsúla a cheilt / le feiceáil bunaithe ar cibé an bhfuil an t-úsáideoir ina bhall de cheann de na grúpaí formheasa.

I dtimpeallacht FBA an ainm úsáideora() fheidhm tuairisceáin i gcónaí folamh, Faraor. What I’ve done is set up a a custom list called “Approval Groups”.

Ní féidir liom aon colúin bhreise a chur leis an liosta.

Nuair a osclaíonn an bhfoirm suas, Tá sé ina riail mar seo:

image

An "atá leagtha luach ar réimse ar" Is anseo:

image

Tá sé seo ag rá go bunúsach: Ceist an liosta na ngrúpaí cheadú saincheaptha agus scagaire go cheist ag lorg aon chéile ina luach Teideal a = "NORDIC".

Má tá an tuairisceáin go bhfuil aon luach, 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, más rud é nach bhfuil an t-úsáideoir reatha rochtain slándála iomchuí don ítim sin ansin ní bheidh an cheist ar ais é, 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.

</deireadh>

Liostáil le mo bhlag.

Lean mé ar Twitter ag http://www.twitter.com/pagalvin

Clibeanna Technorati: ,

InfoPath // Míniú amháin le haghaidh "Unhandled eisceacht nuair a rindreáil foirm System.Xml.XmlException: Comhadchríoch gan choinne cé go bhfuil Ainm parsáil tharla. "

Bhí mé ag obair ar fhoirm InfPath lá atá inniu ann agus bhí ar siúl suas i gcoinne a sheanchara, "Eisceacht Unhandled nuair rindreáil foirm System.Xml.XmlException: Comhadchríoch gan choinne cé go bhfuil Ainm parsáil tharla. "

This happened to me a long time ago and I don’t know what exactly I did to resolve it. Honestly, Sílim go raibh mé ag transitioning le tionscadal nua agus ní fhaca sé seo ar cheann réiteach (mo replacements bhí chun déileáil leis an tinneas cinn). I do remember it was a devil of a problem. I spent several unsuccessful days dealing with it. Since then, Mé le feiceáil sé seo teacht suas ar fóraim MSDN ar a laghad uair amháin i rith na bliana seo caite agus riamh a chonaic i ndáiríre ar fhreagra do sé.

Bhuail mé é sa lá atá inniu agus fortunately an uair seo , 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.

I mo chás, ba chúis leis an bhfadhb ag na céimeanna:

  1. Eilimint nua a chur le foinse sonraí mar réimse téacs.
  2. Buail sé isteach ar an bhfoirm.
  3. Athraigh sé taispeáint i liosta anuas.
  4. Abair leis an liosta anuas a tharraingt ar a luachanna ó liosta saincheaptha SharePoint.

Níl a fhios agam má tá na céimeanna ina fhadhb nó b'fhéidir, ar bhealach go bhfuil na sonraí ar an liosta féin ina fhadhb. I’m going to experiment a bit and see if I can nail downt he parameters of this with any more detail.

</deireadh>

Liostáil le mo bhlag.

Lean mé ar Twitter ag http://www.twitter.com/pagalvin

Clibeanna Technorati:

Leabaigh Nótaí ón Fhorbróir Inside Do Foirmeacha InfoPath

Tá mé fós ag maireachtáil in Foirmeacha InfoPath domhan agus is gá dom a cheann de na "beag" athruithe a dhéanamh ar leagan gur, ar an drochuair, breaks a naming convention I adopted with it two weeks ago. Shíl mé go féin, "Tá duine éigin ag dul chun breathnú ar an rud a bliain ó anois agus a rá, 'Cad a bhí Paul ag smaoineamh? By Jove, Déanann sé aon chiall Comhshocrú ainmniúcháin!"

Thuig mé go raibh mé in ann a chruthú d'fhonn ar an bhfoirm seo agus ansin, arís, 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

Tá mé chumrú an bhfoirm ionas nach féidir le húsáideoirí a fháil chun tuairim sin agus dá bhrí sin,, 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!

</deireadh>

Liostáil le mo bhlag.

Lean mé ar Twitter ag http://www.twitter.com/pagalvin

Clibeanna Technorati:

Bainistíochta InfoPath Radhairc

Is cosúil mé chun dul trí chéim InfoPath áit, amach as an gorm, 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.

Tá mé i lár an chéim InfoPath agus tá mé a chruthú foirmeacha InfoPath le go leor de na tuairimí. Rud amháin tú faoi deara dócha go bhfuil an 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, mar atá léirithe anseo:

image

I wish I had been doing this all along.

</deireadh>

Liostáil le mo bhlag.

Lean mé ar Twitter ag http://www.twitter.com/pagalvin

Clibeanna Technorati:

Foirm Sevices InfoPath, Foirmeacha Fíordheimhniú Bhunaithe (FBA) agus Ainmneacha Comhad uathúil

Tá mé ag obair ar roinnt InfoPath foirmeacha an tseachtain seo i CAONAIGH i dtimpeallacht FBA agus d'fhoghlaim, nuair a chuaigh mé go dtí na foirmeacha a imscaradh chuig dtimpeallacht a tháirgeadh le crios FBA go bhfuil an ainm úsáideora() function function does not work. I was using it to generate unique file names.

Bhuel, nach fheidhm ag obair i dtimpeallacht FBA (ar a laghad, ní as an bhosca). Agus, ar mhachnamh, ag baint úsáide as ainm úsáideora ar an mbealach a bhí beartaithe agam nach mbeadh a ráthú ainm comhaid ar leith i gcás ar bith.

Mo réiteach a bhí a bhaint as an anois() 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. (Ní féidir liom é a thaispeáint ar an scáileán lámhaigh, ach chuir coinníoll maidir leis an riail chun dóiteáin ach amháin nuair a "myFilename" Is folamh). I used to set the file name at the data source level. Typically, Ba mhaith liom rud éigin a dhéanamh (dona) mar seo:

image

Is é an fhadhb atá leis sin go má úsáideora Osclaíonn an bhfoirm ar an Luan agus athraíonn an t-úsáideoir B é ar an Máirt, go mbainfidh tú deireadh suas le dhá chineál éagsúla ó dhá úsáideoirí éagsúla shábháil sé le hainmneacha úsáideora éagsúla.

Mar sin,, mar is féidir annoying mar FBA a bheith i gcoitinne agus le InfoPath go háirithe, rinne sé dom ath-smaoineamh a sonraí teicniúla beag ach tábhachtach i ndáiríre agus chuige sin ní ba mhaith liom a dhéanamh ar shlí eile!

</deireadh>

Liostáil le mo bhlag.

Lean mé ar Twitter ag http://www.twitter.com/pagalvin

Clibeanna Technorati:

Quick agus Simplí: Déan Foirm InfoPath Léigh Amháin (Foirmeacha InfoPath Seirbhísí i CAONAIGH)

Níl cás gnó coitianta mar seo:

  • Líonann Úsáideora amach an fhoirm InfoPath.
  • Cuireann foirm.
  • Thosaíonn próiseas sreabhadh oibre fada ag rith amach.
  • Cé go bhfuil an sreabhadh oibre ag rith, nach bhfuil muid ag iarraidh duine ar bith a athrú ar inneachar na foirme.

Seo sampla 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. Le himeacht ama, le forbróirí éagsúla, there can be some divergence.

D'fhéadfadh sé seo rogha eile ag obair níos fearr i gcásanna áirithe:

  • Add a new field to the form called "IsEditable".
  • Socraigh a luach réamhshocraithe a fíor.
  • Chur chun cinn é nuair a fhoilsiú go CAONAIGH.
  • I sreabhadh oibre, an luach na IsEditble a leagtar a bheith bréagach.
  • Téigh ar ais go dtí an fhoirm.
  • Add a rule that "upon open of the form", dhíchumasú do cnaipe shábháil nuair a bhíonn IsEditable bréagach.

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'fhéidir i litreacha móra dearg ar fud an barr an leathanaigh.

Sa tionscadal amháin, I created a "workflow status" féachaint ar. 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" riail go huathoibríoch athraigh chun tuairim sin agus bhí an t-úsáideoir stádas achoimre deas beag.

</deireadh>

Liostáil le mo bhlag.

Athraigh Féach View Bunaithe ar Aitheantas Úsáideora I Foirm InfoPath

Bhí muid ar fhorbair foirm InfoPath le tuairimí éagsúla chun tacú le cíos nua / on-boarding process. When the company hires a new person, an roinn TF agus grúpaí eile is gá gníomh a ghlacadh (arna chur ar bun párolla, chumas rochtain ar iarratais chuí, aimsiú deasc, etc). 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. Mar sin féin, we needed to simplify things for the new hire’s direct manager. This person should not see any of the IT related stuff. Go deimhin, ba chóir di a fheiceáil ach amháin ag féachaint ar an fhoirm agus nach bhfuil an rogha a fheiceáil na tuairimí eile, fiú.

I ár gcás, go bhfuil cuntas bainisteoir díreach ar ceangailte go díreach leis an bhfoirm caoinchead teagmháil roghnóir (which I am always wanting to call a "people picker" ar chúis éigin).

Is iad na céimeanna seo a leanas:

1. I modh a dhearadh, téigh go dtí Tools -> Foirm Roghanna -> Oscail agus Sábháil.

2. Select "rules".

3. Create a new rule whose action is "switch to view" agus ghiaráil a bhfuil riocht an ainm úsáideora() fheidhm.

ainm úsáideora() returns the "simple" user name without the domain. If I log into SharePoint with credentials "domain\pagalvin", ainm úsáideora() 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. Mar shampla, 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?

</deireadh>

Clibeanna Technorati: