వర్గం ఆర్కైవ్స్: InfoPath 2007 // పత్రాలు సర్వర్

InfoPath లో కేస్ స్పందించని పోలిక

నేను ఒక వ్యాసం వ్రాసి SharePointBriefing.com and they put it up live today.

ఇక్కడ ఒక టీజర్ వార్తలు:

image

దాన్ని తనిఖీ.

</చివర>

నా బ్లాగ్ సబ్స్క్రయిబ్.

వద్ద ట్విట్టర్ లో నన్ను అనుసరించండి http://www.twitter.com/pagalvin

Technorati టాగ్లు:

త్వరిత హిట్: SharePoint ఒక SPListItem నుండి నేరుగా InfoPath XML పఠనం

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 (ఇది కేవలం XML ఫైళ్లు, కాబట్టి అది నిజానికి చాలా సులభం).

ప్రాజెక్టు అప్ పెరుగుతుండగా, 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:

/// ఇక్కడ క్లాస్ నిర్వచనం stuff, సహా:
ప్రైవేట్ SPFile mySharePointFile; /* ఒక SPList యొక్క భాగము */
// మరింత కోడ్ ఇక్కడ మరియు మేము కలిగి తరగతి పద్ధతి లోపల వెళ్తాడు:
XmlTextReader textReader;
textReader = కొత్త XmlTextReader(mySharePointFile.OpenBinaryStream());

= textReader.WhitespaceHandling WhitespaceHandling.గమనిక;

textReader.Read();

// నోడ్ విలువ కలిగి ఉంటే

అయితే (textReader.Read())
{

… and so on and so forth …

పైన ప్రధాన బిట్ మేము OpenBinaryStream ద్వారా నేరుగా InfoPath చదవగలరు ఉంది() method call on the SPFile as a parameter to the constructor on XmlTextReader. It works great.

</చివర>

నా బ్లాగ్ సబ్స్క్రయిబ్.

వద్ద ట్విట్టర్ లో నన్ను అనుసరించండి http://www.twitter.com/pagalvin

Technorati టాగ్లు:

Programmatically InfoPath పత్రాలు వరకు అటాచ్మెంట్లు సేకరించడానికి (వారి పేర్లు సహా!)

I have an expense entry solution for a client that leverages InfoPath and workflow. At one point during the approval process, నేను ఆ మంచి InfoPath డేటా అన్ని అలాగే జోడింపులను తమను కలిగి ఇమెయిల్ ఉత్పత్తి అవసరం (నిట్టూర్పు) ఎవరైనా ఒక ఒరాకిల్ డేటాబేస్ అనువర్తనం ఆ డేటా మానవీయంగా తిరిగి కీ తీసుకెళ్ళవచ్చు.

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. (మీరు ఇప్పటికీ నోడ్ మరియు అన్ని ఆ కనుగొనేందుకు అవసరం, కానీ కేవలం XML పదనిరూపణ వార్తలు).

నేను అటాచ్మెంట్ Base64-ఎన్కోడ్ తెలుసు మరియు నేను మొదట కేవలం Base64 డేటా వెలికితీసే మార్గంలో సాగిన, decoding it and saving it. అయితే, నేను త్వరగా నేను పైన పేర్కొన్న వ్యాసం దొరకలేదు వరకు ఫైలు పేరు కూడా ఎలా పొందాలో తెలియదు గ్రహించారు.

నేను నిజానికి ఆ చాలా ప్రారంభ ఉందని, కానీ నేను దాని స్ప్లిట్ పర్సనాలిటీ ద్వారా ఆఫ్ ఉంచబడినది. ఒక వైపు, the article *says* it’s good for InfoPath 2007. ఇప్పటికీ, కోడ్ మరియు సూచనలను విజువల్ స్టూడియో గురించి అన్ని 2003 మరియు InfoPath సూచనలు 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

Technorati టాగ్లు: ,,

మీరు మీ SharePoint వాతావరణంలో అనారోగ్య ఒక టాడ్ ఉండవచ్చు భయపడి ఉంటే, నాకు మీరు పరిష్కరించడానికి సహాయం ఆ ఒక ఆరోగ్య చెక్ తో.

ఒక FBA లు ఎన్విరాన్మెంట్ InfoPath తో ఆమోదం గుంపులు మేనేజింగ్

నేను ప్రమాణీకరణ ఆధారంగా ఒక రూపాల్లో InfoPath ఉపయోగించి అమలు అవసరం వ్యయ ఆమోదం ప్రక్రియ (FBA లు) రకాల సేవలు ఉపయోగించి వాతావరణంలో (వెబ్ ఆధారిత InfoPath).

రెండు ఆమోదం గ్రూపులు మరియు ప్రక్రియ ఈ వలె పని చేస్తుంది:

  • వాడుకరి వ్యయ నివేదిక నింపుతుంది మరియు ఆమోదం కోసం సమర్పించిన.
  • మొదటి స్థాయి అప్రూవరు గుంపుకు ఒక ఇమెయిల్ ట్రిగ్గర్స్.
  • మొదటి స్థాయి అప్రూవరు నివేదిక సమీక్షించి ఆమోదించిన లేదా తిరస్కరించారు.
  • మొదటి స్థాయి వ్యక్తి ఆమోదిస్తుంది, వ్యవస్థ రెండవ స్థాయి అప్రూవరు చెబుతుంది.

విషయాలు InfoPath వైపు, 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, పాపం. 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.

</చివర>

నా బ్లాగ్ సబ్స్క్రయిబ్.

వద్ద ట్విట్టర్ లో నన్ను అనుసరించండి http://www.twitter.com/pagalvin

Technorati టాగ్లు: ,

InfoPath // రూపం System.Xml.XmlException రెండరింగ్ ఉన్నప్పుడు "నిర్వహించని మినహాయింపు కోసం ఒక వివరణ: ఫైలు యొక్క ఊహించని ముగింపు పార్సింగ్ పేరు ఏర్పడింది అయితే. "

నేను ఒక InfPath రూపం నేడు పని మరియు ఒక పాత స్నేహితుడు వ్యతిరేకంగా చేసావు జరిగినది, రూపం System.Xml.XmlException రెండరింగ్ ఉన్నప్పుడు "నిర్వహించని మినహాయింపు: ఫైలు యొక్క ఊహించని ముగింపు పార్సింగ్ పేరు ఏర్పడింది అయితే. "

This happened to me a long time ago and I don’t know what exactly I did to resolve it. Honestly, నేను ఒక కొత్త ప్రాజెక్టు పరివర్తన అని అనుకుంటున్నాను మరియు ఈ ఒక పరిష్కారం నోచుకోలేదు (నా భర్తీ ఆ తలనొప్పి వ్యవహరించవలసిఉంది). I do remember it was a devil of a problem. I spent several unsuccessful days dealing with it. Since then, నేను ఈ గత సంవత్సరం కనీసం ఒకసారి MSDN ఫోరంలలో పైకి వచ్చి కనిపించే మరియు నిజంగా ఇది ఒక సమాధానం నోచుకోలేదు చేసిన.

నేను అదృష్టవశాత్తూ నేడు మరియు ఈ సమయం హిట్ , 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.

నా విషయంలో, సమస్య ఈ దశలను ద్వారా వాటిల్లింది:

  1. ఒక టెక్స్ట్ రంగంలో ఒక డేటా మూలం ఒక కొత్త మూలకం జోడించు.
  2. రూపం లోకి డ్రాప్.
  3. జాబితా డ్రాప్ డౌన్ దానిని యొక్క ప్రదర్శన మార్చండి.
  4. ఒక SharePoint కస్టమ్ జాబితా నుండి దాని విలువలు లాగండి జాబితా డ్రాప్ డౌన్ చెప్పండి.

ఆ విధానాలను సమస్య లేదా ఉండవచ్చు కారణం ఉంటే నాకు తెలీదు, ఏదో జాబితా లోనే డేటా సమస్య. 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

Technorati టాగ్లు:

మీ InfoPath పత్రాలు ఇన్సైడ్ డెవలపర్ గమనికలు పొందుపరచండి

నేను ఇప్పటికీ InfoPath పత్రాలు ప్రపంచంలో నివసిస్తున్న మరియు నేను ఒక రూపం ఆ "చిన్న" మార్పులు చేయడానికి అవసరం, అకస్మాత్తుగా, breaks a naming convention I adopted with it two weeks ago. నేను నాలో అనుకున్నది, "ఎవరైనా ఇప్పుడు నుండి ఒక సంవత్సరం ఈ విషయం చూడండి మరియు చెప్పటానికి వెళ్తున్నారు, 'ఏం పాల్ ఆలోచిస్తూ జరిగినది? By Jove, తన నామకరణ అస్సలు అర్ధమే!"

నేను అప్పుడు నేను ఈ కోసం రూపాన్ని దృష్టిలో సృష్టించగలము గ్రహించారు, మరోసారి, 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

వినియోగదారులు ఆ దృశ్యం నాకు అందువలన కనుక నేను రూపం కాన్ఫిగర్ చేసారు, 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

Technorati టాగ్లు:

InfoPath అభిప్రాయాలు మేనేజింగ్

నేను InfoPath దశల్లో ఉన్న ద్వారా వెళ్ళడానికి అనిపించవచ్చు, నీలం బయటకు, 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.

నేను ఒక InfoPath దశ మధ్యలో ఉన్నాను నేను వీక్షణలు చాలా InfoPath రూపాలను సృష్టించే వెబ్. మీరు బహుశా గమనించవచ్చు ఒక విషయం అని 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, ఇక్కడ ఉదహరించిన:

image

I wish I had been doing this all along.

</చివర>

నా బ్లాగ్ సబ్స్క్రయిబ్.

వద్ద ట్విట్టర్ లో నన్ను అనుసరించండి http://www.twitter.com/pagalvin

Technorati టాగ్లు:

InfoPath ఫారం Sevices, దృవీకరణను ఏర్పరుస్తుంది (FBA లు) మరియు ప్రత్యేక ఫైల్ పేర్లు

నేను ఈ వారం ఒక FBA లు వాతావరణంలో MOSS లో ఏర్పరుస్తుంది కొన్ని InfoPath పని మరియు నేర్చుకున్నాడు చేసిన, నేను ఒక FBA లు జోన్ ఒక ఉత్పత్తి వాతావరణంలో రకాల అమర్చే వెళ్ళినప్పుడు వినియోగదారు పేరు() function function does not work. I was using it to generate unique file names.

బాగా, ఆ ఫంక్షన్ ఒక FBA లు వాతావరణంలో పని లేదు (కనీసం, కాదు బాక్స్ బయటకు). మరియు, ప్రతిబింబం మీద, నేను సంకల్పించింది విధంగా పేరును ఉపయోగించి ఏ సందర్భంలో ఒక ఏకైక ఫైల్ పేరు హామీ కాదు.

నా పరిష్కారం ఇప్పుడు ఉపయోగించాలని() 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. (నేను స్క్రీన్ షాట్ లో చూపవద్దు, కానీ "myFilename" ఖాళీ ఉన్నప్పుడు మాత్రమే కాల్పులు నిబంధన ఒక పరిస్థితి చాలు). I used to set the file name at the data source level. Typically, నేను ఏదో ఒకటి ఉంటుంది (చెడ్డ) ఈ వంటి:

image

ఆ సమస్య వినియోగదారు ఒక సోమవారం రూపం తెరుచుకుంటుంది మరియు యూజర్ B మంగళవారం మార్చుకుంటారు ఉంది, రెండు వేర్వేరు వినియోగదారులు వివిధ వినియోగదారు పేర్లతో అది సేవ్ నుండి మీరు రెండు విభిన్న రకాల ముగిసేవి చేస్తాము.

ఈ విధంగా, FBA లు వంటి బాధించే ప్రత్యేకించి మరియు InfoPath తో ఉండవచ్చు, ఇది నాకు నేను లేకపోతే చేసారు అని తిరిగి అనుకుంటున్నాను చిన్న కానీ చాలా ముఖ్యమైనది సాంకేతిక వివరాలు మరియు విధానం తయారు!

</చివర>

నా బ్లాగ్ సబ్స్క్రయిబ్.

వద్ద ట్విట్టర్ లో నన్ను అనుసరించండి http://www.twitter.com/pagalvin

Technorati టాగ్లు:

త్వరిత మరియు సింపుల్: ఒక InfoPath ఫారం చదవడానికి మాత్రమే చేయండి (MOSS లో InfoPath పత్రాలు సేవలు)

ఈ వంటి ఒక సాధారణ వ్యాపార దృష్టాంతంలో ఉంది:

  • వాడుకరి ఒక InfoPath ఫారం నింపుతుంది.
  • సమర్పించారు.
  • దీర్ఘకాలంగా వర్క్ఫ్లో ప్రక్రియ ఆరంభిచే.
  • వర్క్ఫ్లో అమలులో ఉన్నప్పుడు, మేము ఎవరైనా రూపం యొక్క విషయం మార్చటానికి వద్దు.

ఈ 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. కాలక్రమేణా, వివిధ అభివృద్ధి తో, there can be some divergence.

ఈ ప్రత్యామ్నాయ కొన్ని సందర్భాల్లో మంచి పనిచేయవచ్చు:

  • Add a new field to the form called "IsEditable".
  • నిజమైన దాని డిఫాల్ట్ విలువ సెట్.
  • MOSS కు ప్రచురించేటప్పుడు ప్రోత్సహించడానికి.
  • వర్క్ఫ్లో లో, తప్పుకు IsEditble విలువ సెట్.
  • కు తిరిగి వెళ్ళు.
  • Add a rule that "upon open of the form", 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, బహుశా పేజీ భాగంలో పెద్ద ఎరుపు అక్షరాలలో.

ఒక ప్రాజెక్ట్లో, 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" ఆ దృశ్యం మొగ్గు మరియు వినియోగదారు ఒక nice కొద్దిగా సారాంశం స్థితిని కలిగి స్వయంచాలకంగా పాలించే.

</చివర>

నా బ్లాగ్ సబ్స్క్రయిబ్.

ఒక InfoPath ఫారం లో వాడుకరి ID ఆధారంగా వీక్షణ మారండి

మేము ఒక కొత్త కిరాయి మద్దతు బహుళ వీక్షణలు ఒక InfoPath రూపం అభివృద్ధి చేసింది / 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.

In our case, 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() ఫంక్షన్.

userName() returns the "simple" user name without the domain. If I log into SharePoint with credentials "domain\pagalvin", userName() 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?

</చివర>

Technorati టాగ్లు: