cancel
Showing results for 
Search instead for 
Did you mean: 

keeping format of long text field in output document

Grill Chef
Grill Chef

keeping format of long text field in output document

Jump to solution

Technician enter debrief in a long text field with carriage return and line space. How can the text field format to be kept in smart doc print out? Currently all content in the long text field is wrap around. Is there a way to printout from smart doc like the way shown on the screen?

Message 1 of 8
1 Solution

Accepted Solutions
Employee
Employee

Re: keeping format of long text field in output document

Jump to solution

Hi Simon Chan​ Hi Desirae Szloboda

I found from internal content that formatting can more than be preserved through HTML and/or CSS customizations.

Below is a response to a question that is very similar to the issue you are encountering with the formatting of the output documat:

"The HTML <pre></pre> tags will preserve formatting, but one potential drawback is that text between those tags won't wrap.   You can gain more control via CSS."

The following code was used by the technical architect that provided the response and he explained that it will preserve white space yet allow wrapping:

<div style="white-space: pre-wrap; word-wrap: break-word; word-break: break-all; hyphens: auto">

formatted text

</div>

Please review and check if this would be helpful.

Thanks!

Younus

crt_younuss​  crt_younus​

Message 7 of 8
7 Replies
Grill Chef
Grill Chef

Re: keeping format of long text field in output document

Jump to solution

I am not sure if my concern of not able to retain format of long text field in output document created from Smart Docs is something ServiceMax would be interested to improve or not. But I cannot believe not many Servicemax users to voice this issue as if any service report, quotation, estimate, packing list being generated in PDF by Smart Docs would not display wording or text with carriage return, indentation in the box. However, I've seen the output document generated by Saleforce is capable of retaining format of text in the long text field as it outputs to PDF. I'm wondering how other ServiceMax user handle this issue.

Currently, I like Smart Docs feature for making all sort of output documents for service report, quotation , and etc. However, all text content typed in long text field are packed without indentation or any separated line when it is shown in PDF output.

Any suggestion or thought of this issue will be greatly appreciated!

Simon

Message 2 of 8
0 Likes
Reply
Pastry Chef
Pastry Chef

Re: keeping format of long text field in output document

Jump to solution

Hi Simon

This has been an issue for us to, and the only way we have found to get around it is to use the following html <tags>

<pre style="font-family: arial, helvetica, sans-serif; line-height: 14px; padding: 0px; white-space: pre-wrap;"> xxx </pre>

where xxx is your text.

We have tried to put these tags in the html of the source code of the Smx Document, but it doesn't work, but if, like us you create your text on an iPad document (as we need templates for the text on the service report), then you can add the tags before and after the text has been created in the document, and then cut and paste it all in to the Smx Document, the tags work and the final text is formatted correctly.

Thanks

Russ

Message 3 of 8
0 Likes
Reply
Grill Chef
Grill Chef

Re: keeping format of long text field in output document

Jump to solution

Hi Russ,

Thanks for your suggestion. We don't use iPad device as most of the update of field activities are quite intensive (lengthy). I also tested out that the Smart Docs code will work on Rich Text field when content of long text copied over to Rich text field. Unfortunately, SFM screen design does not take Rich Text field. I am checking if there is a way to copy Long Text field content over to Rich Text field in real time.

Thanks,

Simon

Message 4 of 8
0 Likes
Reply

Re: keeping format of long text field in output document

Jump to solution

Hi Simon,

Thank you for your post here on the community!  We are always interested to hear what capabilities our customers are looking for in our application.  I don't have an answer for you today, I will need to do some research on this, but I can get back to you on it if that is okay with you.  If it is not something that can be done out of the box today, I can explore some possible alternative solutions.  You can then create an Idea within the community for this feature and functionality.  The Ideas are read by our Product team and reviewed.

Have a great weekend!

All the best,

Dez

crt_desiraes​

Message 5 of 8
0 Likes
Reply
Grill Chef
Grill Chef

Re: keeping format of long text field in output document

Jump to solution

Hi Dez,

Thank you for looking into this text field format for output document. I think able to retain format of text (long field) in output document is a big plus feature in SmartDoc. I was surprised to learn that it was incapable in Smartdoc but SFDC output document could retain long text field format.  Current output doc generated by smartdoc is limited to a short single line description. Imagine if a long text field shows format or carriage return (CR) as Rich Text field does. This will definitely help the output document such as field service report, engineering report, quotation, contract, and etc.to a new level of professional look.

Please keep me inform if there is any update or work around on this issue.

Thanks,

Simon

Message 6 of 8
0 Likes
Reply
Employee
Employee

Re: keeping format of long text field in output document

Jump to solution

Hi Simon Chan​ Hi Desirae Szloboda

I found from internal content that formatting can more than be preserved through HTML and/or CSS customizations.

Below is a response to a question that is very similar to the issue you are encountering with the formatting of the output documat:

"The HTML <pre></pre> tags will preserve formatting, but one potential drawback is that text between those tags won't wrap.   You can gain more control via CSS."

The following code was used by the technical architect that provided the response and he explained that it will preserve white space yet allow wrapping:

<div style="white-space: pre-wrap; word-wrap: break-word; word-break: break-all; hyphens: auto">

formatted text

</div>

Please review and check if this would be helpful.

Thanks!

Younus

crt_younuss​  crt_younus​

Message 7 of 8
Fry Chef
Fry Chef

Re: keeping format of long text field in output document

Jump to solution

Younus - this was very helpful - you saved me a boatload of time.

Thanks!

Chris

Message 8 of 8