Rich text field and sharepoint list - InfoPath Dev
in

InfoPath Dev

Rich text field and sharepoint list

Last post 01-10-2012 12:00 PM by annodomini. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 03-29-2006 01:42 AM

    • goose
    • Not Ranked
    • Joined on 03-23-2006
    • Posts 6

    Rich text field and sharepoint list

    Hi,

    In the post "Add Sharepoint List Items with InfoPath" AndersR said :"
    I tried pulling multiline/rich text fields from Sharepoint lists before, but using managed code. This can be done by binding to the XML node itself and not the xml.Text property." Can you explain more ? How can I put my Rich Text Form in a sharepoint line with all the break line and stuff like this keep. Because after I will use this sharepoint list as a secondary data source for another form and I want to retrieve my information from my rich text field with all the formatting charcters.

    thanks

    arnaud
  • 03-30-2006 11:08 PM In reply to

    Re: Rich text field and sharepoint list

    Hi Arnaud,
    Thanks for your post. I'll send e-mail to Anders and ask him to chime in.
    Patrick Halstead
    Project Manager at Qdabra
  • 04-01-2006 05:58 PM In reply to

    Re: Rich text field and sharepoint list

    Hiya Arnaud,

    just to get things straight:
    the quote above was cut from a discussing mapping data from IP to SPS using managed code.

    When mapping rich text fields to SPS using managed code, just map the field to the element itself, not the text property of the node! eg. myXmlNode = myfield instead of myXmlNode.text = myfield

    hope this makes sense, else feel free to ask :-)

  • 05-10-2006 12:40 AM In reply to

    • statto
    • Not Ranked
    • Joined on 05-10-2006
    • Posts 1

    Re: Rich text field and sharepoint list

    According to the following KB article you are unable to do the above
    http://www.google.com/url?sa=D&q=http://support.microsoft.com/Default.aspx%3Fscid%3Dkb%3Ben-us%3B896693%26spid%3D2515%26sid%3D229 without script or managed code

    I have found a way of tricking Infopath into bringing it all across as
    text. This worked for me as I only needed text (more than 255
    characters). You could probably script something to convert the HTML to
    Rich Text.

    Create a Sharepoint list with the columns you need. Any that you need
    to be rich text, just create them as nomral text fields for the moment
    as placeholders.

    In Infopath create a data connection to the Sharepoint list created
    above and selected all the columns needed.

    Now go back to the Sharepoint list and delete the columns that you
    created as placeholders and recreate them as richtext fields (Multiple
    lines of text). They must have exactly the same names as their
    placeholders.

    The data will now be available in the Sharepoint list data connection
    in Infopath.

    Please not if you modify the data connection the rich text fields in
    Sharepoint will not be available and you will need to do the above
    again.

    I haven't fully tested this, so if anyone knows any known problems let me know
  • 02-01-2007 08:22 AM In reply to

    Re: Rich text field and sharepoint list

    So, I tried this and the text is displayed in the InfoPath form, but it's displayed with <DIV> tags. Anyway to get rid of those?

    Is there any other way to get multiple line columns from a Sharepoint list?
  • 07-17-2009 06:41 AM In reply to

    • lday8
    • Not Ranked
    • Joined on 06-10-2009
    • Posts 4

    Re: Rich text field and sharepoint list

    Hi,

    You could try setting the value to a Rich Text field in InfoPath (an XHTML field).  This should solve your problem.

     

    Cheers,

    Luke

  • 09-29-2010 12:52 PM In reply to

    Re: Rich text field and sharepoint list

     that doesn't work

     

  • 11-14-2011 02:06 AM In reply to

    • djasp
    • Not Ranked
      Male
    • Joined on 10-01-2011
    • NL
    • Posts 12

    Re: Rich text field and sharepoint list

    I have the same issue with <DIV> .. is there no solution?
  • 01-10-2012 12:00 PM In reply to

    Re: Rich text field and sharepoint list

    I found a workaround for this (somewhat).

    My requirement was to get a XHTML (Rich text) field from SharePoint 2007 into InfoPath 2007. This required the following 1st step:

    Change SharePoint field to plain text;

    Refresh data connection in InfoPath and select the field that was changed to plain text;

    Lastly, change the field back to Rich text in SharePoint.

    Now that we have the field in InfoPath 2007, to be able to view the info without the the tags (such as <div>, <li>, etc.), you must:

    Go to File-->Save As Source Files in InfoPath;

    Edit the view XSLT file (may be called something else);

    For your field, add disable-output-escaping="yes" to <xsl:value-of .... /> for your field (for expression boxes)

    My requirement was not to post this info back, I only needed to be able to copy/paste the data I pulled from SharePoint, so I changed xd:disableEditing="yes" to xd:disableEditing="no" for my expression field.

    Rich text fields have <xsl:copy-of .... />, I didn't test this on that field but my assumption is that it might work.

    After you're done, open the "manifest" file and save over your existing form.

    Hope that helps!

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.