Skip to main content
Answer

Show text (CSV, HTML, XML, JSON, etc..) in Document previewer

  • September 11, 2019
  • 4 replies
  • 262 views

Harm Horstman
Superhero
Forum|alt.badge.img+21
We like to show the contents of interface messages in a previewer control.

I found out that this is possible with an expression field, with the formula like below and use a domain with control type HTML.

'
body {
font-family: Calibri, Tahoma, Arial;
font-size: 14px;
font-weight: bold;
}
' + REPLACE(REPLACE(REPLACE(t1.message_body, '<', '<'), '>', '>'), CHAR(10), '
') + '
'

It is nice, but it does not fully give the desired output.

Any suggestions?

Best answer by Anne Buit

Which GUI platforms are we talking about? The Windows GUI does have a code editor available that can highlight various programming languages.
This topic has been closed for replies.

4 replies

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • September 11, 2019
Hi Harm,

I suppose you are trying to get rid of HTML control characters in the XML?

Instead of the replaces, you can try to use the XML formatter in SQL Server to escape the characters:

code:
(select t1.message_body as [*] for xml path(''))

Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • September 11, 2019
Hi Anne,

Thanks for your reply.

In this case the purpose is a technical screen, not for regular end users.

I like to see the actual XML data, like when you open an XML file in NotePad, Notepad++. If possible with language specific formatting.

The same for TXT, JSON, SQL etc.

I hope you see a solution.

Br,

Harm

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • Answer
  • September 12, 2019
Which GUI platforms are we talking about? The Windows GUI does have a code editor available that can highlight various programming languages.

Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • September 12, 2019
For now, the Windows Gui.

I will try your suggestion, but prefer using the document previewer because it uses all available space.

A combination of both would be ideal.