Skip to main content
Solved

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

  • September 11, 2019
  • 4 replies
  • 246 views

Harm Horstman
Superhero
Forum|alt.badge.img+20
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.
View original
Did this topic help you find an answer to your question?

4 replies

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 612 replies
  • 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+20
  • Author
  • Superhero
  • 476 replies
  • 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
  • 612 replies
  • 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+20
  • Author
  • Superhero
  • 476 replies
  • 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.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings