Sidebar

How can I quote or unquote a multi-line block of text?

0 votes
880 views
asked Nov 29, 2016 by mike-r-7535 (13,830 points)

I have a multiline block of text, like an SQL query or a SOAP envelope.  Is there a way to bring that text into a QIE script like this:

SELECT *
FROM person p
WHERE p.id = 15156123

And put it into a variable like this:

var query = "SELECT *\n" +
"FROM person p\n" +
"WHERE p.id = 15156123"

1 Answer

0 votes

As of QIE version 3.0.44, you can quote and unquote text within your script from the Edit menu of the text editor.

For example, open a custom mapping function and select the unquoted text like this:

Then go to the Edit > Quote Commands > Quote Selection from the menu bar, like this:

You can reverse this process if you want to get the unquoted string by selecting the quoted SQL query, like this:

Then go to the Edit > Quote Commands > Unquote Selection from the menu bar, like this:

If it is unable to perform the quote operation, or you haven't selected any text, you will receive a message like this:

answered Nov 30, 2016 by mike-r-7535 (13,830 points)
...