Skip to main content

Hey folks!

 

I'll admit - I don't use O365 very much. And, due to this fact, I struggle with some things that are fairly basic.

 

Example (and the topic of this post): 

 

We're using the O365 Search Query to retrieve some data on a Content Type. Neat. We're returning the source as XML. Also neat. HOWEVER! We need to be able to view the XML brought back with all of its tags in tact, and it keeps rendering them and thus disappearing. Here is what we have tried:

 

- Emailing it to ourselves using the Advanced Lookup to select Workflow Variable, txtXML, and selecting the format as Plain Text

- Writing it to a multi-line SharePoint column set to Plain Text

- Wrapping with the tags XMP

- Sacrificing a keyboard to the gods of XML

 

What's interesting is that, if we Log To History, all is well - XML, ahoy.

 

Can you help us out?

 

CC Amy Grendus

 

(PS: If you're interested in why we want it as XML, it's because we want to see all the possible tags that we can consume from the search.) 

‌ | ‌ | ‌ | ‌ | ‌ |


Interesting, as seen in my use case here:   Where I was using a repeating section and needed to parse that XML, I was able to write it directly into a plain text multi line column with no issues. Can you post some more details of your workflow and what actions you're using and how they're configured?


For such case I am logging the XML structure to multiline plain text field. Remember, the field has to be plain text. 

Also, when you send it via email, it is just impossible to open it in Outlook Online. I recall I was able to view the XML structure in Outlook Desktop or that I was sending it to my Gmail. 

Anyway, using plain multiline text field does its job. 

Regards 

Tomasz 


I do not have experience with O365, so I'm not aware of its specifics.

but haven't you tried to simply XmlEncode it?


Column Configuration:

Workflow Configuration:

Search Query Output:

The Output Into The Column:

(no XML tags) (email output looks the same)

Output Into Log History:

Is this SharePoint Environment haunted?


Ah, sorry ‌ - I didn't know that!

As for XML Encoding... it already is encoded, it's just leaving this world when it's published.. I've updated with a comment below to show specifics.  


Rhia Wieclawek wrote:

Is this SharePoint Environment haunted?

Yes, I believe so. The only option is to burn it down, I'm so sorry.

What if you leave it as a string rather than selecting plain text?


Same thing, I believe, but I'll re-run to make sure!


And remember we still have no inline functions in O365


LOL

STRING DID IT.

What in the ever-loving-grapes, Nintex.


We were trying so hard to ensure Plain Text since that is always the requirement ....

Still a shame it won't work in email.

Thank you Courtney <3  (and everyone for responding)


Dude, a lot of times I just try every single variable format just to see what happens. I've gotten some interesting results. Glad you found something that worked for you! 


Dammit, this doesn't seem possible. Try using the default "String" output, not the plain text when saving into the multiline field.

And the last idea - as long as you don't want to work with that XML but just see it, maybe before outputting it use the "replace" actions and change < into &lt; and > into &gt; ?

Regards,

Tomasz


just to be sure we're talking about the same encoding: is the string you get in history log one that you meant already encoded?

it looks to me, you mean you have encoded XML node's values, but not XML nodes itself.

 what should effectively be sent to mail or written to plaintext should look like:

&lt;Results hits=&quot;2&quot;&gt;&lt;Result&gt;&lt;Rank&gt;

I do quite believe this is your problem

maybe you could try with a encoded hand-made short piece of (valid) XML


Haha the string was correct - Courtney had the same idea. 

Who would've thunk it... default!


just for my lack of knowledge, isn't simple string limited to 255 chars as it is on on-prem?


I think that's only for the column type, I've never had a problem using the "string" format for a variable cutting off that I can recall


The "single line" text field is limited. But this wasn't the case. Seems that "Plain text" is making a real plain text out of XML structure as well


It's freaking out and saying "XML isn't plain!!! WHAT DO I DO???" 

Silly thing.


I had this same issue try using string not xml,  


Reply