Multi line custom field badly saved to database

Hello community,
we're fighting currently against a strange issue.
All projects has some multi line custom fields to fill every week for project status.
During this exercise, some of the comments seems not well saved to database.
While coming back to the PDP, we are seeing a strange behavior :
Starting from that, I tried to look in the database and the saved html format is badly formatted, you can see a </div> in the middle and a missing one at the end of the sentence:
<div>Révision et approbation de l&#39;ODS de Facilité.</div> <div>&#160;</div></div> <div>Compléter&#160;le questionnaire à soumettre aux experts.</div>
<div>&#160;</div> <div>Présentation et choix des experts.
As of now, we did not find any reason why this is happening.
While opening back the PDP in edition and saving back ,the problem is solved.
This is annoying because we are treating the html code as xml for reporting as seen here (http://aboutmsproject.com/converting-rtf-to-text-in-sql-revisited/
) and this is crashing because of badly formatted html code
any advices?
regards
Jérome

Hi Jerome,
I've seen this issue occur when text is pasted into the field from other applications, like Outlook and Word. I've not yet been able to determine how to get it to stop. The error then causes the invalid XML issue you are seeing. A former co-worker had successfully
integrated the use of jQuery into PDPs. I'm wondering if they have a HTML clean function.
Thanks for finding my post useful!
Treb Gatte, Project MVP, Tumble Road LLC |
@tgatte | http://AboutMSProject.com

Similar Messages

  • Permanently save line spacing in a multi-line text field

    Me: Adobe Acrobat 8 Pro, Windows Vista
    (I think the people who will be using the form have Reader 7 on Windows)
    I work in a doctors' clinic, and we use phone message sheets to document conversations between the patients/us/nurses/doctors, and I scanned the form and made it into a fillable PDF for our secretaries to fill out more quickly. The "message" area has pre-printed lines on it, and the multi-line text field I placed there needs to match up to the lines. I used the Rich Text Formatting options to set it to "Exactly 24 Points," but I can't get it to KEEP the formatting permanently. The only way I could get it to save the formatting in that field was to put a space in it and then save it, and then give that to the 2 phone secretaries. It works perfectly the first time, but instead of just closing/re-opening the file to start a new message, one of the secretaries highlights everything in the "message" field and deletes it... which deletes the line spacing formatting. I've told her
    b numerous
    times to leave that starting space in the field, but she "forgets" so all of her messages look messed up. So is there a way to force that line spacing
    b PERMANENTLY
    ???? Here's a shrunken screenshot of the field -- I wish I could just erase the lines altogether so the spacing wouldn't matter, but the secretaries type/print the message out, then the nurses/docs write on the page with pen so the lines have to stay. http://img187.imageshack.us/my.php?image=notepreviewph8.jpg
    Thanks!

    You can set the font size of the text. Then play with the underlines in the original document to match the needs of the font that is used. Print to a new PDF and then use replace pages to put the new page into the form without changing the form fields. I was able to do this with a word processing document by adding underlining in the document with 12 pt and setting the font to 12 pt in the text field. You can play with the font, the border of the field, and the underlining in the original document to get the desired result. Is this optimal, probably not. However it does the job.

  • Printing all text in a multi-line text field??  Can it be done?

    I was wondering if there is a way to print out a multi-line field and have all text entered print as well.  Currently, anytime someone enters more information in a multi-line text field on our form than is set to show without scrolling, when a PDF is created for printing from the results page, only the text that fits within the specified size prints.  You can scroll within the PDF and read it all, but I can't seem to figure out how to get all of the text to show and have that field resize accordingly on the printed copy.
    Is there a way?  Thanks.

    Is there an easy way to determine the character count that is visible in a given multi-line text field when designing the form, so if I want to allow 500 characters, the text box I create is large enough for 500 characters?  Obviously I can just do a trial and error process using a cut and paste of 500 characters and testing it, but is there an easier way?

  • Hello All. I am working on a form, but I need to format the leading in a multi-line text-field.

    Hello All. I am working on a form, but I need to format the leading in a multi-line text-field. The options for the text-field only show a font size option, but no other styling options. Is there a way to format the leading? Thanks!

    Not within ID, and I'm not sure it can be done in Acrobat afterward either.

  • Set the number of lines allowed in multi-line text field

    Hi,
    I am designing a form where I have some multi-line text fields where I only want the user to be able to enter a maximum of say 5 lines. I know I could do this by enabling the "Limit Length to Visible Area" option, however, this option is ignored by Reader 7 and the field scrolls, hiding any text that spills beyond the visible area from printouts. It works great in 8 though. To avoid this bug/feature in Reader 7, is there some script that I can use to limit the number of lines allowed in a text field?
    Thanks

    I ran into similar issues switching between Acrobat/Reader. Here is the prominent code that works for me when I use this in "Enter" event of the textField.
    var aSOM=this.somExpression.substr(15,this.somExpression.length - 1);
    var acroField = event.target.getField(aSOM);
    acroField.doNotScroll = true;
    I chose Allow Multiple Lines alone and noting else.
    Good Luck,
    SekharN

  • SRM 7.0 customer fields not saved in shopping cart

    Dear experts,
    I have created 2 fields using the fields extension in the customizing and set the metadata for them to be displayed. The fields are visible on screen. However when data enteres, this data is not being saved in the Shopping cart document.
    Any clues?
    Another question, which is a bit techno, is when i have extended the SC screen using the enhancement framework instead of using the standard extension options. i would have thought that by binding these fields to the standard header node with the custom fields as structure would have saved me the job of throwing data and fetching data from the table/bapi. This isn't working either. I reckon the problem will be related to issue #1 above.
    Regards
    Ali

    >
    Muhammad Ali Mahmood wrote:
    > Dear experts,
    >
    > I have created 2 fields using the fields extension in the customizing and set the metadata for them to be displayed. The fields are visible on screen. However when data enteres, this data is not being saved in the Shopping cart document.
    > Any clues?
    Hello Ali,
    did you extend both the structure INCL_EEW_PD_ITEM_CSF_SC and INCL_EEW_PD_ITEM_CSF? It should be useful to define a custom structure that contains your fields and append it to both the structure named above. Then re-check if the metadata structure has been enhanced properly (in your case, view /SAPSRM/V_MDF_IC).
    Hope this helps,
    Matteo
    EDIT: I was assuming you were intended to add new fields at item level. If your task is to add fields @ header level, simply substitute HEADER to ITEM in the structure's name.
    Edited by: Matteo Montalto on Dec 7, 2009 12:14 PM

  • Alignment of multi-line text field in PDF form

    I am trying to create a simple form with text fields and check boxes. In several of my text fields I would like the user to enter multiple lines of text aligned at the top-left of the textbox. Everything appears proper until I check the "Multi-line" option within the properties menu. The text then jumps down the textbox several lines. In the attached image I have selected multi-line for the "Responsibilities:" and "Objectives:" fields but not the three following. I am using Acrobat Pro 9 to develop the form. Any help is greatly appreciated.

    Thanks for your reply. The entered text then shifts down the textbox (as shown).

  • How to get plain text out of a multi line text field in Client Side Object Model?

    I am trying to read plain text from a MultiLineTextField in a List. This is how my code looks so far:
    //Get connection
    ClientContext context = new ClientContext("URL");
    Web site = context.Web;
    context.Load(site);
    context.ExecuteQuery();
    //Get list collection
    ListCollection lists = context.Web.Lists;
    context.Load(lists);
    context.ExecuteQuery();
    //Get specific list
    List menu = lists.GetByTitle("menu");
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXML = "<View/>";
    ListItemCollection dishes = menu.GetItems(camlQuery);
    context.Load(menu);
    context.Load(dishes);
    context.ExecuteQuery();
    //Iterate through all dishes
    foreach(ListItem dish in dishes)
    Console.WriteLine("Dish: {0}:", dish.FieldValues["Name"]);
    Console.WriteLine("Price: {0}:", dish.FieldValues["Price"]);
    //Here I get my problem
    Console.WriteLine("Ingredients: {0}:", dish.FieldValues["Ingredients"]);
    In the last line where I try to read the ingredients, I am reading from a MultiLineTextField which is set to RichText. It is also supposed to stay in RichText format, as hyperlinks are supposed to be added there. The problem is that the output not only contains
    div-tags but also some weird question marks I never added to the field. I am trying to solve this issue for a couple of days now but it seems that there are only two possible solutions.
    Set the field from RichText to PlainText, which is not an option in my case.
    Use Regex to remove the div-tags. Please do not suggest this option. Mainly because I do not consider this to be a clean solution for this issue. Plus, I tried it and it removes the tags but those weird question marks stay.
    There seems to be a third option I found
    here. It is also mentioned in this
    question and it seems to work. But I can not get it to work for me. This is how it looks:
    string myString = item.FieldMultiLineText[Field_Name];
    So I wonder what is item supposed to be here? I suppose it is not a
    ListItem because in my case it does not offer a FieldMultiLineText-property.
    A short, informative code snippet would be great if you decide to help me with this issue.
    Thanks in advance.
    Algorithmen und Datenstrukturen in C#:
    TechNet Wiki

    Thank you for your reply. Unfortunately ListItem does not contain a definition for the Fields method.
    Algorithmen und Datenstrukturen in C#:
    TechNet Wiki
    You need to use the Microsoft.SharePoint class library and then use the sharepoint version of all the list objects you are using. See below.
    //Get connection
    ClientContext context = new ClientContext("URL");
    Web site = context.Web;
    context.Load(site);
    context.ExecuteQuery();
    //Get list collection
    SPListCollection lists = context.Web.Lists;
    context.Load(lists);
    context.ExecuteQuery();
    //Get specific list
    SPList menu = lists.GetByTitle("menu");
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXML = "<View/>";
    SPListItemCollection dishes = menu.GetItems(camlQuery);
    context.Load(menu);
    context.Load(dishes);
    context.ExecuteQuery();
    //Iterate through all dishes
    foreach(SPListItem dish in dishes)
    Console.WriteLine("Dish: {0}:", dish.FieldValues["Name"]);
    Console.WriteLine("Price: {0}:", dish.FieldValues["Price"]);
    //Here I get my problem
    SPFieldMultiLineText multilineField = dish.Fields.GetField("Ingredients") as SPFieldMultiLineText;
    string ingredients = "";
    if (multilineField != null)
    ingredients = multilineField.GetFieldValueAsText(dish["Ingredients"]);
    Console.WriteLine("Ingredients: {0}:", ingredients);}
    I hope this helps
    Alex

  • Setting default field values for multi-line text fields in lists?

    For the multiple lines of text field in a list, I'm using SharePoint Designer 2013 to set a default
    value for the field, but I need that default value to include rich text formatting (the default value includes a formatted table). Is this possible without having to delve into JavaScript? And if so, how?

    Yes, we can :)
    You can do it with powershell
    $web = get-spweb <yourweb>
    $list = $web.lists["<yourList>"]
    $field = $list.fields["<yourField>"]
    $field.DefaultValue = "place your html code here"
    $field.update()
    hope that helps

  • Can I show different fonts and colors text on 1 multi-line text fields?

    I want to format different messages on 1 mutli-line field with different fonts and colors for the heading lines. Can I do that in Forms 6i ?

    You must use in trigger Post-query the sentence:
    Example:
    DECLARE
    cur_itm VARCHAR2(80);
    cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
    VISUAL_ATTRIBUTE,'My_Favorite_Named_Attribute');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;

  • Interactive PDF, Printing all text from within multi line scrolling field

    I have an A4 form created in Indesign CS4 and made interactive in acrobat 9 pro on Mac with several fields and have a question.
    I have a requirement for a number of the form fields to scroll in order to capture lengthy content if need be, my client also wants the ability to print the content in full from the fields if they so wish. However if the content is lengthy say filling more than the field area shows on screen how would this be printable?
    So :
    A form is set up to show 3 lines of text and employs a scrollable field solution to accommodate infinite text entry
    The user writes 6 lines of text (only 3 show on screen though due to the forced form field area)
    They want to print a record for hard copy or distribution showing all 6 lines
    I have just purchased the CS6 version with Acrobat X, but would like to solve this in with my previous version if possible, have only just installed CS6 and due to learning curve need to retain it in Acrobat 9 pro if possible.
    Thanks
    Matt HM

    Sure, you could do that fairly easily with just a bit JavaScript. It would have to be done by someone with Acrobat who receives the filled-in form. The text from the fields could be extracted and placed in a text file attachment that you create with JavaScript, and then extract the file attachment.
    For the general methods you'd use, see:
    createDataObject: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.450.html
    exportDataObject: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.463.html
    Another less flexible approach is to extract to a tab delimited text file: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.460.html
    For this, you can specify just the fields you want to include, so you don't have to bother with all of the fields in the form being included.

  • Scroll bar in multi-line text field

    I have a text field that is populated (through event code) with a list of errors that are detected when a user tries to sign a form.  That list can be long, and I had it designed so that if the list was longer than the height of the text box, then scroll bars would appear next to the text box and the user could scroll through the entire list.
    I haven't changed anything, but the scroll bars just stopped appearing.  Now the user can only see the top text that fits in the text box, and cannot scroll down to the lower text.  Any idea?  Is there a setting somewhere that controls that, something that perhaps got corrupted that I could fix?  I'm looking around, but do not see anything obvious.
    FYI, I have the Allow Multiple Lines option checked.
    Thanks,
    Emily

    Figured it out... sort of...
    I am not exactly sure what the problem was, but here's how I fixed it, in case anyone has a similar problem.
    I thought the problem may be that I had code in my click event for that text field.  That code displayed a message if a user tried to enter text into that read-only field, explaining that the field was automatically populated.  That click event code is relatively new, so I thought that maybe Adobe deactivates the scrollbar when there is a click event for an object, since using the scroll bar requires you to click on the object, and "clicking" now has a different set of actions associated with it.  So,I deleted the click event, and the scroll bar returned!
    I thought I was so smart, and had identified both my problem and solution.  Then, just for fun, I decided to try to put the click event code back into the object.  And, much to my surprise, now I have both the click event code, AND I have a working scroll bar.  So now, even though I have fixed my problem, I am not sure what its cause was.  Except maybe there was a bug somewhere?
    Anyway, hope that helps, in case someone has a similar problem.  There seems to be some interplay between having a click event and having a scroll bar.
    Emily

  • How to Remove the /Div in a Multi-line Field when reporting in Excel, getting

    I am uisng Excel Services to extract data from PS2013.  And the Multi-line text fields include the </Div> syntax.  I have looked at a lot of the links regarding how to do this.  I have even borrowed code that was on someones blog. 
    When I try and use it I get the following message and cannot not seem to resolve it after reading varous links regarding this issue. 
    Any ideas?  As a work around I have created an Excel Macro to remove it, however would like to solve it in the query
    Error Message
    The data types
    Nvarchar and Ntext are incompatible in the add operator
    Here is the syntax
    declare @Headxml nvarchar(350)
    declare @Footxml nvarchar(50)
    set @Headxml = N'<?xml version="1.0"?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"
    [<!ENTITY  nbsp "&#xA0;"><!ENTITY quot "&#x22;">]><html><body>'
    set @Footxml = N'</body></html>'
    SELECT   ProjectOwner.ProjectUID as [ProjectUID],
    ProjectOwner.ProjectName as [Project Name],
    ProjectOwner.[Project Number] as [ECP#],
    TaskRelated.TaskName as [Task Name],
    MSP_WssRiskToTaskLinks_UserView.RiskID as [Risk ID],
    MSP_WssRiskToTaskLinks_UserView.Title as [Risk Title],
    MSP_WssRiskToTaskLinks_UserView.Status as [Status],   
    MSP_WssRiskToTaskLinks_UserView.AssignedToResource as [Assigned To],
    MSP_WssRiskToTaskLinks_UserView.Owner as [PM], 
    MSP_WssRiskToTaskLinks_UserView.DueDate as [Due Date],  
    MSP_WssRiskToTaskLinks_UserView.Probability as [Probability],
    MSP_WssRiskToTaskLinks_UserView.Impact as [Impact], 
    MSP_WssRiskToTaskLinks_UserView.Exposure as [Exposure],
    MSP_WssRiskToTaskLinks_UserView.Cost as [Cost],
    MSP_WssRiskToTaskLinks_UserView.CostExposure as [Cost Exposure],  
    MSP_WssRiskToTaskLinks_UserView.Category as [Category],
    ISNULL(LTRIM((CONVERT(xml,(@Headxml+MSP_WssRiskToTaskLinks_UserView.[Description]+@Footxml),3)
            .value(N'(/)','nvarchar(4000)'))),'') AS [YourMulti-lineCustomFieldNewName],
    MSP_WssRiskToTaskLinks_UserView.MitigationPlan as [Mitigation Plan],  
    MSP_WssRiskToTaskLinks_UserView.ContingencyPlan as [Contingency Plan],
    MSP_WssRiskToTaskLinks_UserView.TriggerTask as [Trigger Task],
    MSP_WssRiskToTaskLinks_UserView.TriggerDescription as [Trigger Description],
    MSP_WssRiskToTaskLinks_UserView.CreatedDate as [Created Date],
    MSP_WssRiskToTaskLinks_UserView.CreateByResource as [Create By],
    MSP_WssRiskToTaskLinks_UserView.ModifiedByResource as [Modified By],
    MSP_WssRiskToTaskLinks_UserView.ModifiedDate as [Modified],
    TaskRelated.TaskUID as [TaskUID],
    TaskRelated.TaskName as [Task Name],
    TaskRelated.TaskStartDate as [Task Start],
    TaskRelated.TaskFinishDate as [Task Finish] FROM dbo.MSP_WssRiskToTaskLinks_UserView
    LEFT OUTER JOIN dbo.MSP_EpmProject_UserView AS ProjectOwner ON ProjectOwner.ProjectUID = MSP_WssRiskToTaskLinks_UserView.ProjectUID
    LEFT OUTER JOIN dbo.MSP_EpmProject_UserView AS ProjectRelated ON ProjectRelated.ProjectUID = MSP_WssRiskToTaskLinks_UserView.RelatedProjectUID
    LEFT OUTER JOIN dbo.MSP_EpmTask_UserView AS TaskRelated ON TaskRelated.ProjectUID = MSP_WssRiskToTaskLinks_UserView.RelatedProjectUID 
    AND TaskRelated.TaskUID = MSP_WssRiskToTaskLinks_UserView.RelatedTaskUID LEFT JOIN dbo.MSP_WssRelationshipType ON
    MSP_WssRiskToTaskLinks_UserView.RelationshipTypeID = MSP_WssRelationshipType.RelationshipTypeID                
    ORDER BY ProjectOwner.ProjectName ASC,  MSP_WssRiskToTaskLinks_UserView.RiskID
    Andrew Payze

    Hi Andrew,
    We normally create a function to do this. Some examples can be found here:
    http://blog.sqlauthority.com/2007/06/16/sql-server-udf-user-defined-function-to-strip-html-parse-html-no-regular-expression/
    http://lazycoders.blogspot.co.uk/2007/06/stripping-html-from-text-in-sql-server.html
    http://stackoverflow.com/questions/457701/best-way-to-strip-html-tags-from-a-string-in-sql-server
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How to find Project Level Text Custom Fields in Project Server 2010 databases?

    Hello,
    We are using Project Server 2010 SP2 in SEM Mode. We are planning to use Project Level Local Custom fields and we want to pull them in reports using SSRS, so I am wondering which table these "Local" (non enterprise) custom fields are stored in
    database.
    Any suggestions?
    Regards,
    Kishore Dodda
    Kishore Dodda

    Hi,
    Please see this
    similar thread about reading local custom fields though the PSI.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Task custom field and formula custom field don't correspond Project Server 2013

    Hi people, I have an interesting case in Project Server 2013 SP1 CU Apr:
    I have a custom task number field called AM. This field get's filled by a PSI action with actual material costs from an external system.
    I also have a custom task cost formula field that is called AM*. This field is a formula field that has the formula [AM]. And summary tasks use the formula field as well.
    As soon as I create a project, assign costs in the external system and let PSI fill the values within AM I get correct values in AM. But nothing is calculated on AM*. If I edit the project in the browser and publish, check in and revisit the project
    AM* still isn't filled.
    If I open the project in MS Project Pro the calculation comes through nicely, however I do not want to use MS project Pro to see correct data in browser.
    Some tests I have already done:
    I have noticed that when I create a new calculated task field AM2*, this get's calculated correctly on the already existing task.
    I have also noticed that opening the custom field in server settings and just saving the field creates correct values on AM*.
    What is going on? I don't want to save the custom formula field every day... There are 11 custom formula fields in the environment at the moment.

    Hi Gary,
    Thank you for the quick response. Please note that the fieldnames are [AM] and [AM*]. There is a difference in field name due to the astrix. However I did think about the situation and changing one of the field names all together didn't do anything for the
    situation at hand.
    It looks like some kind of refresh thing, because without changing anything in the custom field just saving the field in server settings will turn op good values. However, values already turned up good in Project Professional 2013. And that suggest
    that there is a calculation error on the PWA side wouldn't you say?
    Anyway, thank you for taking time to look into this matter.
    Erik

Maybe you are looking for